DataRow.ItemArray Property
Gets or sets all the values for this row through an array.
Assembly: System.Data (in System.Data.dll)
| Exception | Condition |
|---|---|
| ArgumentException | The array is larger than the number of columns in the table. |
| InvalidCastException | A value in the array does not match its DataType in its respective DataColumn. |
| ConstraintException | An edit broke a constraint. |
| ReadOnlyException | An edit tried to change the value of a read-only column. |
| NoNullAllowedException | An edit tried to put a null value in a column where AllowDBNull of the DataColumn object is false. |
| DeletedRowInaccessibleException | The row has been deleted. |
You can use this property to set or get values for this row through an array. If you use this property to set values, the array must have the same size and ordering as the column collection. Passing null in the ItemArray indicates that no value was specified.
Users can generate exceptions in the ColumnChanging event or the RowChanging event.
Available since 1.1