DataRowVersion Enumeration
Describes the version of a DataRow.
Assembly: System.Data (in System.Data.dll)
| Member name | Description | |
|---|---|---|
| Current | The row contains current values. | |
| Default | The default version of DataRowState. For a DataRowState value of Added, Modified or Deleted, the default version is Current. For a DataRowState value of Detached, the version is Proposed. | |
| Original | The row contains its original values. | |
| Proposed | The row contains a proposed value. |
The DataRowVersion values are used when retrieving the value found in a DataRow using Item or the GetChildRows of the DataRow object.
The DataRowVersion informs you what version of a DataRow exists. Versions change under the following circumstances:
After calling the DataRow object's BeginEdit method, if you change the value, the Current and Proposed values become available.
After calling the DataRow object's CancelEdit method, the Proposed value is deleted.
After calling the DataRow object's EndEdit method, the Proposed value becomes the Current value.
After calling the DataRow object's AcceptChanges method, the Original value becomes identical to the Current value.
After calling the DataTable object's AcceptChanges method, the Original value becomes identical to the Current value.
After calling the DataRow object's RejectChanges method, the Proposed value is discarded, and the version becomes Current.
The following example checks the DataRowVersion of a DataRow before invoking the AcceptChanges method.
Available since 1.1