Mapping Datagrid to Datasource Row

  • Thread starter Thread starter Hex @dezimal
  • Start date Start date
H

Hex @dezimal

Using the CurrentRowIndex of a datagrid how can I found the matching row in
its datasource ( a dataset)?

Hex.
 
I solved this problem by using the CurrencyManager:
Dim objCurrencyManager As CurrencyManager =
CType(BindingContext(objDataGrid.DataSource, objDataGrid.DataMember),
CurrencyManager)

column_value = CType(objCurrencyManager.Current,
DataRowView).Item("column_name")

Hex.
 
Back
Top