Quantcast
Channel: Windows Forms Data Controls and Databinding forum
Viewing all articles
Browse latest Browse all 2535

Finding a the related row position in a datatable form a dataview

$
0
0

Hi All,

Sorry about the complexity of the following.

I have a DataSet containing a number of tables, one table SLAWarnings is shown in a DataGrid through the DataView dvWarnings.  Attached to the table is a BindingManagerBase bmWarnings which is used to fire the PoistionChanged event.

On this event I set up a temp relationship within the dataset to another table.  I then use the .Position of the bmWarnings to GetChildRows of the related table and loop through them adding the rows and other stuff to a tree view.

The problem I have is if the DataGrid has been sorted, the .Position then applies to the DataGrid row and NOT the DataTable row needed for the relationship.

Can anyone give me some help/advice on how to get the underlying DataTable row Index, or another way to do this without looping every record in the related table.

TIA

Stu


Viewing all articles
Browse latest Browse all 2535

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>