This documentation is archived and is not being maintained.

DataRow.RowError Property

Gets or sets the custom error description for a row.

Namespace: System.Data
Assembly: System.Data (in

public string RowError { get; set; }
/** @property */
public String get_RowError ()

/** @property */
public void set_RowError (String value)

public function get RowError () : String

public function set RowError (value : String)

Not applicable.

Property Value

The text describing an error.

Uses the HasErrors property to first determine whether a DataRow contains errors.

The following example sets error text for ten rows of a table displayed in a DataGrid control.

private void SetRowErrors(DataTable table)
    // Set error text for ten rows. 
    for(int i = 0; i < 10; i++)
        // Insert column 1 value into each error.
        table.Rows[i].RowError = "ERROR: " 
            + table.Rows[i][1];
    // Get the DataSet for the table, and test it for errors.
    DataSet dataSet = table.DataSet;
private void TestForErrors(DataSet dataSet)
    // Test for errors. If DataSet has errors, test each table.
        foreach(DataTable tempDataTable in dataSet.Tables)
            // If the table has errors, then print them.
        // Refresh the DataGrid to see the error-marked rows.
private void PrintRowErrs(DataTable table)
    foreach(DataRow row in table.Rows)

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0, 1.1, 1.0

.NET Compact Framework

Supported in: 2.0, 1.0

XNA Framework

Supported in: 1.0