how to: bindingSource.Current <=> DataTable.Row

  • Thread starter Thread starter toja
  • Start date Start date
T

toja

What's the best way (proper) to get dataRow when I have
bindingsource.Current item. I use :

myTableRow=
((MyDataSet.MyTableRow)((DataRowView)(MyBindingSource.Current)).Row)


It works, but it doesn't elegantly to me.


And in the other way:
I have dataRow and i want to find position of this row in my DataSet. I
use:

MyBindingSource.Position = MyBindingSource.Find("id", myTableRow.id);

May be there is an easier way ?
 
Back
Top