Compare Datatables and get changed rows.
-
Hi I have a gridview which has some records (recordID is being fetched from database) I load the results in datatable which has columns like -------------------------------------- RecordID | EmployeeID | Name | Address -------------------------------------- 1 4 John xyz 2 5 Smith xyz Now user can edit the records with a checkbox list (problem is that he can reselect the existing checked items again, so the recordID is null for reselected items, I set it to zero to distinguish all new records) So the new datatable becomes -------------------------------------- RecordID | EmployeeID | Name | Address -------------------------------------- 0 4 John xyz (reselected rows with 0 id) 0 5 Smith xyz (reselected rows with 0 id) 0 8 Evans xxx (new record) Now I am on form update button, I am trying to figure out how to find which records to insert and how to find records to do nothing with ? The reselected records already existing in database are creating problem for me. Mike.