This is what I am trying to achieve:
- DataTable populated using data from source without database
- This table is bound to a DataGridView using a BindingSource.
- The DataGridView is updated by the user, so some cells now have new values.
- Since the table is bound to a datagridview, its values are updated.
How to get only updated rows (rows that were edited) in grid / datatable?
I tried:
DataRow[] updatedRows =
_table.Select(null, null, DataViewRowState.ModifiedCurrent);
But this always returns 0 rows. Is there a way to get only modified rows?
Worst case:
- Save a copy of the source table
- Get a new table from datagridview data source
- Compare all rows.
Thank!