Development & Training in .NET
.NET Interview Questions
What are the versions available in DataRow?
Feb 23rd
The following versions of data are available in a single DataRow object:
1. Unchanged – No changes have been made since the last call to AcceptChanges or since the row was created by DataAdapter.Fill.
2. Added – The row has been added to the table, but AcceptChanges has not been called.
3. Modified - Some element of the row has been changed.
4. Deleted - The row has been deleted from a table, and AcceptChanges has not been called.
5. Detached - The row is not part of any DataRowCollection. The RowState of a newly created row is set to Detached. After the new DataRow is added to the DataRowCollection by calling the Add method, the value of the RowState property is set to Added.
Detached is also set for a row that has been removed from a DataRowCollection using the Remove method, or by the Delete method followed by the AcceptChanges method.