Updating the first record listed in my DataGridView
that is bound to my DataTable
. When I run Save process I run through this line of code to get all records that have been modified:
DataTable modifiedRows = unitDataDT.GetChanges(DataRowState.Modified);
If I have changed the first record in my DataGridView
my modifiedRows DataTable
is Null.
If I change any of the following records they are in my modifiedRows DataTable
.
I have tried changing other records in my DataGridView
first and then changing the first record then running the Save process and still....other records are there and the first record is not.....
Also....I checked the unitDataDT and it has the change. I sorted the datagridview to try and update a different record and it still did not add the change to the modifiedRows Datatable....so it seems to not work for the first record listed in the DataGridView.
Any ideas?