We save each line of the grid to DB when you leave it or by hitting save button. I send those datarows down to the database and get dataset back wich contains changed rows. When I merge those two datasets (the original one and with fresh saved rows). I loose the selected rows from the grid. Can I merge dataset and still hold on to selected rows and current rows?
Imported from legacy forums. Posted by Goggi (had 538 views)
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)