Table of Contents

Class DataGridViewExCheckBoxCell

Namespace
ExControls
Assembly
ExControls.dll

DataGridView cell with a check box that can be drawn in the custom style with its own colors like ExCheckBox.

public class DataGridViewExCheckBoxCell : DataGridViewCheckBoxCell, ICloneable, IDisposable, IDataGridViewEditingCell
Inheritance
DataGridViewExCheckBoxCell
Implements
Inherited Members

Constructors

DataGridViewExCheckBoxCell()

Initializes a new instance of the DataGridViewExCheckBoxCell class in the default style.

public DataGridViewExCheckBoxCell()

Properties

BorderColor

Color of the CheckBox's border

public Color BorderColor { get; set; }

Property Value

Color

DefaultStyle

Default style of the Control

public bool DefaultStyle { get; set; }

Property Value

bool

HighlightColor

Color of the border and mark of CheckBox when mouse is over the Control

public Color HighlightColor { get; set; }

Property Value

Color

MarkColor

Color of the CheckBox's mark

public Color MarkColor { get; set; }

Property Value

Color

SquareBackColor

Background color of CheckBox's square

public Color SquareBackColor { get; set; }

Property Value

Color

Methods

Clone()

Creates an exact copy of this cell.

public override object Clone()

Returns

object

An object that represents the cloned DataGridViewCheckBoxCell.

OnMouseLeave(int)

Called when the mouse pointer moves from a cell.

protected override void OnMouseLeave(int rowIndex)

Parameters

rowIndex int

The row index of the current cell or -1 if the cell is not owned by a row.

OnMouseMove(DataGridViewCellMouseEventArgs)

Called when the mouse pointer moves within a cell.

protected override void OnMouseMove(DataGridViewCellMouseEventArgs e)

Parameters

e DataGridViewCellMouseEventArgs

A DataGridViewCellMouseEventArgs that contains the event data.

Paint(Graphics, Rectangle, Rectangle, int, DataGridViewElementStates, object?, object?, string?, DataGridViewCellStyle, DataGridViewAdvancedBorderStyle, DataGridViewPaintParts)

Paints the current DataGridViewCheckBoxCell.

protected override void Paint(Graphics graphics, Rectangle clipBounds, Rectangle cellBounds, int rowIndex, DataGridViewElementStates elementState, object? value, object? formattedValue, string? errorText, DataGridViewCellStyle cellStyle, DataGridViewAdvancedBorderStyle advancedBorderStyle, DataGridViewPaintParts paintParts)

Parameters

graphics Graphics

The Graphics used to paint the cell.

clipBounds Rectangle

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

cellBounds Rectangle

A Rectangle that contains the bounds of the cell that is being painted.

rowIndex int

The row index of the cell that is being painted.

elementState DataGridViewElementStates

A bitwise combination of DataGridViewElementStates values that specifies the state of the cell.

value object

The data of the cell that is being painted.

formattedValue object

The formatted data of the cell that is being painted.

errorText string

An error message that is associated with the cell.

cellStyle DataGridViewCellStyle

A DataGridViewCellStyle that contains formatting and style information about the cell.

advancedBorderStyle DataGridViewAdvancedBorderStyle

A DataGridViewAdvancedBorderStyle that contains border styles for the cell that is being painted.

paintParts DataGridViewPaintParts

A bitwise combination of the DataGridViewPaintParts values that specifies which parts of the cell need to be painted.