DataRow::Item Property (String^)
.NET Framework (current version)
Gets or sets the data stored in the column specified by name.
Assembly: System.Data (in System.Data.dll)
public: property Object^ default[ String^ columnName ] { Object^ get(String^ columnName); void set(String^ columnName, Object^ value); }
Parameters
- columnName
-
Type:
System::String^
The name of the column.
| Exception | Condition |
|---|---|
| ArgumentException | The column specified by columnName cannot be found. |
| DeletedRowInaccessibleException | Occurs when you try to set a value on a deleted row. |
| InvalidCastException | |
| NoNullAllowedException | Occurs when you try to insert a null value into a column where AllowDBNull is set to false. |
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.
.NET Framework
Available since 1.1
Available since 1.1
Show: