Gets or sets the custom error description for a row.
[Visual Basic] Public Property RowError As String [C#] public string RowError {get; set;} [C++] public: __property String* get_RowError(); public: __property void set_RowError(String*); [JScript] public function get RowError() : String; public function set RowError(String);
The text describing an error.
Uset the HasErrors property to first determine if a DataRow contains errors.
[Visual Basic]
Private Sub SetError() Dim myError As String myError = "Replace this text." Dim myRow As DataRow ' Create a new row using a DataGrid control's DataTable. myRow = DataGrid1.DataGridTable.DataTable.NewRow ' Set error description. myRow.RowError = myError End Sub Private Sub DataGrid1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Dim currRow As DataRow ' Set the current row using the RowNumber property of the CurrentCell. currRow = DataGrid1.DataGridTable.DataTable. _ Rows(DataGrid1.CurrentCell.RowNumber) ' Display the row error. label1.Text = currRow.RowError End Sub
DataRow Class | DataRow Members | System.Data Namespace | SetColumnError | Error