A row state indicates the status of a row; row versions maintain the values stored in a row as it is modified, including current, original, and default values.
Both Row States and Row Versions are defined below,
- Unchanged: No changes have been made since the last call to AcceptChanges or since the row was created by 'DataAdapter.Fill'.
- Added: The row has been added to the table, but AcceptChanges has not been called.
- Modified: Some element of the row has been changed.
- Deleted: The row has been deleted from a table, and AcceptChanges has not been called.
- 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.
- Current: The current values for the row. This row version does not exist for rows with a RowState of Deleted.
- Default: The default row version for a particular row. The default row version for an Added, Modified, or Unchanged row is Current. The default row version for a Deleted row is Original. The default row version for a Detached row is Proposed.
- Original: The original values for the row. This row version does not exist for rows with a RowState of Added.
- Proposed : The proposed values for the row. This row version exists during an edit operation on a row, or for a row that is not part of a DataRowCollection.