Export (0) Print
Expand All
Expand Minimize

DataGridView.ShowRowErrors Property

Gets or sets a value indicating whether row headers will display error glyphs for each row that contains a data entry error.

Namespace:  System.Windows.Forms
Assembly:  System.Windows.Forms (in System.Windows.Forms.dll)

public bool ShowRowErrors { get; set; }

Property Value

Type: System.Boolean
true if the DataGridViewRow indicates there is an error; otherwise, false. The default is true.

The ErrorText property indicates if there is an error in one of the cells in a row. If ErrorText is set to a value other than Empty, then an error glyph (ErrorProvider icon) is shown in the row header.

The default width of the row header includes enough room to display the error glyph, whether or not the glyph is displayed. If the row header size is adjusted so that there is not enough space to display the glyph completely, the glyph is not rendered.

Because row headers can display both text and glyphs, header content is displayed by priority, as follows:

  1. Text displayed in the row header cell.

  2. The editing glyph.

  3. The error glyph.

For example, if the row width is decreased, the error glyph disappears first, then the standard glyph, then text.

Advanced users can customize the error glyph by developing a custom DataGridViewRowHeaderCell or DataGridViewCell class.

.NET Framework

Supported in: 4.5, 4, 3.5, 3.0, 2.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Show:
© 2014 Microsoft