Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
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, 3.5, 3.0, 2.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

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

Community Additions

ADD
Show:
© 2015 Microsoft