DataGridViewCellPaintingEventArgs(DataGridView, Graphics, Rectangle, Rectangle, Int32, Int32, DataGridViewElementStates, Object, Object, String, DataGridViewCellStyle, DataGridViewAdvancedBorderStyle, DataGridViewPaintParts) DataGridViewCellPaintingEventArgs(DataGridView, Graphics, Rectangle, Rectangle, Int32, Int32, DataGridViewElementStates, Object, Object, String, DataGridViewCellStyle, DataGridViewAdvancedBorderStyle, DataGridViewPaintParts) DataGridViewCellPaintingEventArgs(DataGridView, Graphics, Rectangle, Rectangle, Int32, Int32, DataGridViewElementStates, Object, Object, String, DataGridViewCellStyle, DataGridViewAdvancedBorderStyle, DataGridViewPaintParts) Constructor

Definition

Initializes a new instance of the DataGridViewCellPaintingEventArgs class.

public:
 DataGridViewCellPaintingEventArgs(System::Windows::Forms::DataGridView ^ dataGridView, System::Drawing::Graphics ^ graphics, System::Drawing::Rectangle clipBounds, System::Drawing::Rectangle cellBounds, int rowIndex, int columnIndex, System::Windows::Forms::DataGridViewElementStates cellState, System::Object ^ value, System::Object ^ formattedValue, System::String ^ errorText, System::Windows::Forms::DataGridViewCellStyle ^ cellStyle, System::Windows::Forms::DataGridViewAdvancedBorderStyle ^ advancedBorderStyle, System::Windows::Forms::DataGridViewPaintParts paintParts);
public DataGridViewCellPaintingEventArgs (System.Windows.Forms.DataGridView dataGridView, System.Drawing.Graphics graphics, System.Drawing.Rectangle clipBounds, System.Drawing.Rectangle cellBounds, int rowIndex, int columnIndex, System.Windows.Forms.DataGridViewElementStates cellState, object value, object formattedValue, string errorText, System.Windows.Forms.DataGridViewCellStyle cellStyle, System.Windows.Forms.DataGridViewAdvancedBorderStyle advancedBorderStyle, System.Windows.Forms.DataGridViewPaintParts paintParts);
new System.Windows.Forms.DataGridViewCellPaintingEventArgs : System.Windows.Forms.DataGridView * System.Drawing.Graphics * System.Drawing.Rectangle * System.Drawing.Rectangle * int * int * System.Windows.Forms.DataGridViewElementStates * obj * obj * string * System.Windows.Forms.DataGridViewCellStyle * System.Windows.Forms.DataGridViewAdvancedBorderStyle * System.Windows.Forms.DataGridViewPaintParts -> System.Windows.Forms.DataGridViewCellPaintingEventArgs

Parameters

dataGridView
DataGridView DataGridView DataGridView

The DataGridView that contains the cell to be painted.

graphics
Graphics Graphics Graphics

The Graphics used to paint the DataGridViewCell.

clipBounds
Rectangle Rectangle Rectangle

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

cellBounds
Rectangle Rectangle Rectangle

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

rowIndex
Int32 Int32 Int32

The row index of the cell that is being painted.

columnIndex
Int32 Int32 Int32

The column index of the cell that is being painted.

cellState
DataGridViewElementStates DataGridViewElementStates DataGridViewElementStates

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

value
Object Object Object

The data of the DataGridViewCell that is being painted.

formattedValue
Object Object Object

The formatted data of the DataGridViewCell that is being painted.

errorText
String String String

An error message that is associated with the cell.

cellStyle
DataGridViewCellStyle DataGridViewCellStyle DataGridViewCellStyle

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

advancedBorderStyle
DataGridViewAdvancedBorderStyle DataGridViewAdvancedBorderStyle DataGridViewAdvancedBorderStyle

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

paintParts
DataGridViewPaintParts DataGridViewPaintParts DataGridViewPaintParts

A bitwise combination of DataGridViewPaintParts values specifying the parts to paint.

Exceptions

dataGridView is null.

-or-

graphics is null.

-or-

cellStyle is null.

paintParts is not a valid bitwise combination of DataGridViewPaintParts values.

Applies to

See also