PC Review Forums Newsgroups Microsoft DotNet Microsoft ADO .NET how to: bindingSource.Current <=> DataTable.Row

Reply

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

 
Thread Tools Rate Thread
Old 05-04-2006, 09:53 AM   #1
toja
Guest
 
Posts: n/a
Default how to: bindingSource.Current <=> DataTable.Row


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 ?

  Reply With Quote
Reply



Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off