Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
PaintErrorIcon Method
Collapse the table of content
Expand the table of content

DataGridViewCell.PaintErrorIcon Method

Paints the error icon of the current DataGridViewCell.

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

protected virtual void PaintErrorIcon(
	Graphics graphics,
	Rectangle clipBounds,
	Rectangle cellValueBounds,
	string errorText


Type: System.Drawing.Graphics

The Graphics used to paint the border.

Type: System.Drawing.Rectangle

A Rectangle that represents the area of the DataGridView that needs to be repainted.

Type: System.Drawing.Rectangle

The bounding Rectangle that encloses the cell's content area.

Type: System.String

An error message that is associated with the cell.

The errorText parameter signals the existence of an error. If errorText is null or String.Empty, the PaintErrorIcon method does nothing.

.NET Framework

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

.NET Framework Client Profile

Supported in: 4, 3.5 SP1
© 2015 Microsoft