Edit

Share via


DataGridViewCell.PaintErrorIcon Method

Definition

Paints the error icon of the current DataGridViewCell.

protected virtual void PaintErrorIcon(System.Drawing.Graphics graphics, System.Drawing.Rectangle clipBounds, System.Drawing.Rectangle cellValueBounds, string errorText);
protected virtual void PaintErrorIcon(System.Drawing.Graphics graphics, System.Drawing.Rectangle clipBounds, System.Drawing.Rectangle cellValueBounds, string? errorText);

Parameters

graphics
Graphics

The Graphics used to paint the border.

clipBounds
Rectangle

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

cellValueBounds
Rectangle

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

errorText
String

An error message that is associated with the cell.

Remarks

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

Applies to

Product Versions
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9, 10

See also