Is there a way to have data tables automatically accept changes or just disable change tracking when making modifications to rows?
When making changes to a datatable, forgetting to call DataTable.AcceptChanges()
can cause a real problem.
Is there a way to have data tables automatically accept changes or just disable change tracking when making modifications to rows?
When making changes to a datatable, forgetting to call DataTable.AcceptChanges()
can cause a real problem.
I think the whole point of a DataTable
is to have the added benefits of row versioning and change tracking. I do not think you can actually disable this behavior. From MSDN:
Each DataRow in the collection represents a row of data in the table. To commit a change to the value of a column in the row, you must invoke the AcceptChanges method.
Do you want to disable row versioning completely or only in specific occasions?