Get the BindingSource position based on DataTable row
Posted
by
Ronald
on Stack Overflow
See other posts from Stack Overflow
or by Ronald
Published on 2010-08-30T16:14:35Z
Indexed on
2012/09/24
3:38 UTC
Read the original article
Hit count: 258
I have a datatable that contains the rows of a database table. This table has a primary key formed by 2 columns.
The components are assigned this way: datatable -> bindingsource -> datagridview. What I want is to search a specific row (based on the primary key) to select it on the grid. I cant use the bindingsource.Find method because you only can use one column.
I have access to the datatable, so I do manually search on the datatable, but how can I get bindingsource row position based on the datatable row? Or there is another way to solve this?
Im using Visual Studio 2005, VB.NET.
© Stack Overflow or respective owner