I’m having some trouble making use of a DataView within a grid. I can step through all the cells in the selected grid row using something like dataGrid[0, 1].ToString(), similarly I can step through all the rows in the DataView (the DataView is set as the DataSource for the dataGrid) using the syntax dataView1[0][1].ToString(). The problem I have is determining how to obtain a hold on the associated DataRow in the underlying DataTable (as set by dataView1.Table = dataTable1 for instance). Do I need to perform something like a Find() against the primary key fields for DataTable / DataView ?
Or is there some more direct and simple way of determining the associated row in the underlying DataTable ?
If I have run a different Sort against the DataView in the dataGrid the row index will not be the same between the DataView (on show) and the DataTable. How can I quickly get a link to this row ?
Any help would be appreciated.
Thanks in advance.
Steve
Or is there some more direct and simple way of determining the associated row in the underlying DataTable ?
If I have run a different Sort against the DataView in the dataGrid the row index will not be the same between the DataView (on show) and the DataTable. How can I quickly get a link to this row ?
Any help would be appreciated.
Thanks in advance.
Steve