DevExpress Sample - Connect Grid with Textboxes


Author
Message
Ricardo Quartier
Ricardo Quartier
StrataFrame User (145 reputation)StrataFrame User (145 reputation)StrataFrame User (145 reputation)StrataFrame User (145 reputation)StrataFrame User (145 reputation)StrataFrame User (145 reputation)StrataFrame User (145 reputation)StrataFrame User (145 reputation)StrataFrame User (145 reputation)
Group: Forum Members
Posts: 87, Visits: 779
Yo, Ben thanks, I'll try here.... Smile
StrataFrame Team
S
StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
Close, Ricardo, but when you navigate Absolute, you need to use the other overload that allows you to specify the absolute index.  Like this:

Private Sub EnhancedList1_SelectedRowChanged() Handles EnhancedList1.SelectedRowChanged
    '-- Establish locals
    Dim loRows As Integer()

    '-- Get the selected rows
    loRows = CType(Me.EnhancedList1.MainView, DevExpress.XtraGrid.Views.Grid.GridView).GetSelectedRows()

    '-- Determine whether there is a row selected
    If loRows.Length > 0 Then
        '-- Navigate to the row within the business object
        Me.BoCadEmpresa1.Navigate(MicroFour.StrataFrame.Business.BusinessNavigationDirection.Absolute, loRows(0))
    End If

End Sub


Ricardo Quartier
Ricardo Quartier
StrataFrame User (145 reputation)StrataFrame User (145 reputation)StrataFrame User (145 reputation)StrataFrame User (145 reputation)StrataFrame User (145 reputation)StrataFrame User (145 reputation)StrataFrame User (145 reputation)StrataFrame User (145 reputation)StrataFrame User (145 reputation)
Group: Forum Members
Posts: 87, Visits: 779
Yo, Ben, shold this work?

Private Sub EnhancedList1_SelectedRowChanged() Handles EnhancedList1.SelectedRowChanged

Me.BoCadEmpresa1.Navigate(MicroFour.StrataFrame.Business.BusinessNavigationDirection.Absolute)

End Sub

 

w00t cause it's not working...


StrataFrame Team
S
StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
Yes, if you're using the ListView, you'll want to attach to the SelectedIndexChanged event.

If you're using the EnhancedList, the event is SelectedRowChanged.

Ricardo Quartier
Ricardo Quartier
StrataFrame User (145 reputation)StrataFrame User (145 reputation)StrataFrame User (145 reputation)StrataFrame User (145 reputation)StrataFrame User (145 reputation)StrataFrame User (145 reputation)StrataFrame User (145 reputation)StrataFrame User (145 reputation)StrataFrame User (145 reputation)
Group: Forum Members
Posts: 87, Visits: 779
Is it still the same way to the List? BigGrin
Ricardo Quartier
Ricardo Quartier
StrataFrame User (145 reputation)StrataFrame User (145 reputation)StrataFrame User (145 reputation)StrataFrame User (145 reputation)StrataFrame User (145 reputation)StrataFrame User (145 reputation)StrataFrame User (145 reputation)StrataFrame User (145 reputation)StrataFrame User (145 reputation)
Group: Forum Members
Posts: 87, Visits: 779
I mean, Enhanced List
StrataFrame Team
S
StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
Yes, you can bind the business object to a grid through a BusinessBindingSource and then bind the business object to the textboxes.  The grid should have an event that you can handle such as RowSelected, SelectedRowIndexChanged, AfterRowSelect, or something to that effect.  In a handler for that method, Navigate() the business object to the row and the textboxes bound to the business object will reflect the selected record in the business object.
Ricardo Quartier
Ricardo Quartier
StrataFrame User (145 reputation)StrataFrame User (145 reputation)StrataFrame User (145 reputation)StrataFrame User (145 reputation)StrataFrame User (145 reputation)StrataFrame User (145 reputation)StrataFrame User (145 reputation)StrataFrame User (145 reputation)StrataFrame User (145 reputation)
Group: Forum Members
Posts: 87, Visits: 779
Hi bros, I've been watchin that DevExpressSample video, and i have a question. Is that a way to connect the grid with the textboxes? This way the aplication can be improved, click the register on the grid, then the textboxes will move to the same register.

Is that a way to make this work?

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search