Gets the error description for a column.
Gets the error description for the column specified by index.
[Visual Basic] Overloads Public Function GetColumnError(Integer) As String
[C#] public string GetColumnError(int);
[C++] public: String* GetColumnError(int);
[JScript] public function GetColumnError(int) : String;
Gets the error description of the specified DataColumn.
[Visual Basic] Overloads Public Function GetColumnError(DataColumn) As String
[C#] public string GetColumnError(DataColumn);
[C++] public: String* GetColumnError(DataColumn*);
[JScript] public function GetColumnError(DataColumn) : String;
Gets the error description for a column, specified by name.
[Visual Basic] Overloads Public Function GetColumnError(String) As String
[C#] public string GetColumnError(String);
[C++] public: String* GetColumnError(String*);
[JScript] public function GetColumnError(String) : String;
The following example sets and gets the error description for a new column in an existing System.WinForms.DataGrid control's DataTable.
Note This example shows how to use one of the overloaded versions of GetColumnError. For other examples that may be available, see the individual overload topics.
[Visual Basic]
Dim myRow As DataRow Dim t As DataTable t = DataGrid1.DataSource.DataTable myRow = t.NewRow Dim ErrorString As String ErrorString = "Replace this text." ' Use DataColumn.Contains to ensure the column exists If myRow.DataTable.Columns.Contains("id") Then myRow.SetColumnError "id", ErrorString Console.WriteLineDebug(myRow.GetColumnError("id")) ' Add the row t.Rows.Add(myRow) End If