DataRow::Item Property (String^, DataRowVersion)
Gets the specified version of data stored in the named column.
Assembly: System.Data (in System.Data.dll)
public: property Object^ default[ String^ columnName, DataRowVersion version ] { Object^ get(String^ columnName, DataRowVersion version); }
Parameters
- columnName
-
Type:
System::String^
The name of the column.
- version
-
Type:
System.Data::DataRowVersion
One of the DataRowVersion values that specifies the row version that you want. Possible values are Default, Original, Current, and Proposed.
| Exception | Condition |
|---|---|
| ArgumentException | The column specified by columnName cannot be found. |
| InvalidCastException | The data types of the value and the column do not match. |
| VersionNotFoundException | The row does not have this version of data. |
| DeletedRowInaccessibleException | The row was deleted. |
The version should not be confused with the RowState property. The version argument describes the state of the data that is contained by the column relative to the column's original value. The RowState property describes the state of the whole row relative to its parent DataTable.
When you set the property, an exception is generated if an exception occurs in the ColumnChanging event.
If this is an immediate edit, see EndEdit for the exceptions that can be generated.
Available since 1.1