A DataRow object can hold data for more than one state. For example, if a DataTable row has been modified, its DataRow object contains the row’s original data and the new modified values.
The DataRowView object represents a view of a DataRow object in a particular state. That state can be one of Current, Default, Original, or Proposed.
A DataView object holds DataRowView objects representing a view of a DataTable selecting particular rows in a particular state.
The DataRowView object’s purpose is to represent a row in a specific state so this object is relatively simple. It basically indicates the chosen state and refers to a DataRow.
The following table describes the DataRowView object’s most useful properties.
Property | Purpose |
---|---|
DataView | The DataView that contains the DataRowView |
IsEdit | Returns True if the row is in editing mode |
IsNew | Returns True if the row is new |
Item | Gets or sets the value of one of the row’s fields |
Row | The DataRow object that this DataRowView represents |
RowVersion | The version of the DataRow represented by this object (Current, Default, Original, or Proposed) |