Home Forums WinForms controls Xceed Grid for WinForms SelectedRows and DataSet merge Reply To: SelectedRows and DataSet merge

User (Old forums)
Member
Post count: 23064

This is not possible by just holding to the old DataRow instance since when the grid is reloaded with data, all DataRows instances are new ones.  So if you try to use the old instance to set the CurrentRow, the grid will raise an exception that the row does not belong to the grid, since it does not find the instance.

What you could do is have a unique value from the old DataRow instance, and use this to make a search in the grid, and once you find the new DataRow instance, use it to set SelectedRows and CurrentRow.

 

Imported from legacy forums. Posted by André (had 774 views)