Reputation: 434
This is what I am trying to achieve:
How do I get only the updated rows(the rows which have been edited) in the grid/datatable?
I have tried :
DataRow[] updatedRows =
_table.Select(null, null, DataViewRowState.ModifiedCurrent);
But this always returns 0 rows. Is there a way to get only the modified rows?
Worst case:
Thanks!
Upvotes: 3
Views: 6122
Reputation: 32841
How about this:
DataTable changedRecordsTable = dataTable1.GetChanges();
You can find more details at How to: Retrieve Changed Rows
Upvotes: 2