DataRow.Item Property (String, DataRowVersion)


The .NET API Reference documentation has a new home. Visit the .NET API Browser on to see the new experience.

Gets the specified version of data stored in the named column.

Namespace:   System.Data
Assembly:  System.Data (in System.Data.dll)

member Item : 
        columnName:string *
        version:DataRowVersion -> Object with get


Type: System.String

The name of the column.

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.

Property Value

Type: System.Object

An Object that contains the data.

Exception Condition

The column specified by columnName cannot be found.


The data types of the value and the column do not match.


The row does not have this version of data.


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.

The following example gets the current version of data at a clicked cell of a DataGrid control.

No code example is currently available or this language may not be supported.

.NET Framework
Available since 1.1
Return to top