DataGridViewRow.GetErrorText(Int32) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets the error text for the row at the specified index.
public:
System::String ^ GetErrorText(int rowIndex);
public string GetErrorText (int rowIndex);
member this.GetErrorText : int -> string
Public Function GetErrorText (rowIndex As Integer) As String
Parameters
- rowIndex
- Int32
The index of the row that contains the error.
Returns
A string that describes the error of the row at the specified index.
Exceptions
The row belongs to a DataGridView control and is a shared row.
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.
Remarks
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.