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, System::String ^ errorText);
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);
abstract member PaintErrorIcon : System.Drawing.Graphics * System.Drawing.Rectangle * System.Drawing.Rectangle * string -> unit
override this.PaintErrorIcon : System.Drawing.Graphics * System.Drawing.Rectangle * System.Drawing.Rectangle * string -> unit
Protected Overridable Sub PaintErrorIcon (graphics As Graphics, clipBounds As Rectangle, cellValueBounds As Rectangle, errorText As String)

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

See also