ADAdministrator Syncfusion Team September 12, 2002 05:13 AM
You can use the currencymanager to get at the underlying datasource. To handle the problem of matching a grid row number to the correct position in the DataSource (as it might be sorted or something). you can use the Binder.RowIndexToPosition method of the grid.
Dim cm As CurrencyManager = Me.GridDataBoundGrid1.BindingContext(Me.GridDataBoundGrid1.DataSource, Me.GridDataBoundGrid1.DataMember)
If Not cm Is Nothing Then
' get the position in the datasource of the row in the grid
Dim position As Integer = Me.GridDataBoundGrid1.Binder.RowIndexToPosition(e.RowIndex)
Dim drv As DataRowView = cm.List(position)
'show first 3 items of the row
'Me.Label1.Text = drv(0).ToString() + drv(1).ToString() + drv(2)
AKAndre KingSeptember 12, 2002 05:26 AM
Thanks, that looks like what I need, I'll try it.
do you people ever sleep? :)