DataGridViewRow::GetErrorText Method (Int32)
.NET Framework (current version)
Gets the error text for the row at the specified index.
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
Parameters
- rowIndex
-
Type:
System::Int32
The index of the row that contains the error.
Return Value
Type: System::String^A string that describes the error of the row at the specified index.
| Exception | Condition |
|---|---|
| InvalidOperationException | The row belongs to a DataGridView control and is a shared row. |
| ArgumentOutOfRangeException | The row belongs to a DataGridView control and rowIndex is less than zero or greater than the number of rows in the control minus one. |
Pass the GetErrorText method the index you used to retrieve the DataGridViewRow. Do not use the Index property for the rowIndex parameter. If the row is shared, Index is -1, which is an invalid value for rowIndex. For more information about row sharing, see Best Practices for Scaling the Windows Forms DataGridView Control.
.NET Framework
Available since 2.0
Available since 2.0
Show: