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.

Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98

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

.NET Framework

Supported in: 3.5, 3.0, 2.0

Community Additions

ADD
Show:
© 2014 Microsoft