update datatable when rows are deleted in the database
Posted on 2015-01-08
I fill a datatable from information from a database via a dataadapter. I have no issues in updating my database from changes in the datatable or updating the datatable from changes in the main database via my dataadapter.
My problem is when I have a deleted row in the main database. I then call a dataadapter.fill and the rows are updated but the deleted row still exists in the datatable.
Is there a quick way to do a .fill and have it delete the rows in the datatable that were deleted in the main database or at least mark them as deleted?