Export (0) Print
Expand All
Expand Minimize

DataGridView.ShowRowErrors Property

Note: This property is new in the .NET Framework version 2.0.

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 */
public boolean get_ShowRowErrors ()

/** @property */
public void set_ShowRowErrors (boolean value)

public function get ShowRowErrors () : boolean

public function set ShowRowErrors (value : boolean)

Property Value

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 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

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

.NET Framework

Supported in: 2.0

Community Additions

ADD
Show:
© 2014 Microsoft