asp.net.ph

DataRow.Item Property ( String, DataRowVersion )

System.Data Namespace   DataRow Class


Returns the specified version of data in the given column name.

Syntax


Object variable = DataRow.Item [ columnName, version ];
... or ...
Object variable = DataRow [ columnName, version ];
  C# VB JScript

Parameters

columnName
The name of the column.
version
One of the DataRowVersion values that specifies the desired row version. Possible values are Default, Original, Current, and Proposed.

Property Value

An Object that contains the data.

Exceptions


Exception Type Condition
VersionNotFoundException Occurs when the row does not have this version of data.
IndexOutOfRangeException Occurs when the column specified by columnName, version can not be found.
InvalidCastException Occurs when the data types of the value and the column do not match.
DeletedRowInaccessibleException Occurs when the row was deleted.

Remarks

The version shouldn't be confused with the RowState property. The version argument describes the state of the data contained by the column in relation to the column's original value. The RowState property describes the state of the entire row in relation to its parent DataTable.

When setting the property, an exception will be thrown if an exception occurs in the ColumnChanging event.

If this is an immediate edit, see EndEdit for the exceptions that can be thrown.

See Also

DataRow Members   DataRow.Item Overload List   DataRowVersion Skip Navigation Links




Home
Suggested Reading


Previous page Back to top Next page

© 2000-2010 Rey Nuñez All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note

You can help support asp.net.ph