how do i determine if my datatable has a new row that hasn't been saved to the database yet? this row can be empty or may contain values. like when you do BindingSource.AddNew.
Note that BindingSource.AddNew does NOT add a new row to the DataTable. It will create a new row but it doesn't get added until you call EndEdit.
As for the question, call GetChanges on the DataTable and specify Added as the DataRowState. If the result is not Nothing then the table contains at least one new row.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.