DataGridViewRowPrePaintEventArgs Constructor

Definition

Initializes a new instance of the DataGridViewRowPrePaintEventArgs class.

public:
 DataGridViewRowPrePaintEventArgs(System::Windows::Forms::DataGridView ^ dataGridView, System::Drawing::Graphics ^ graphics, System::Drawing::Rectangle clipBounds, System::Drawing::Rectangle rowBounds, int rowIndex, System::Windows::Forms::DataGridViewElementStates rowState, System::String ^ errorText, System::Windows::Forms::DataGridViewCellStyle ^ inheritedRowStyle, bool isFirstDisplayedRow, bool isLastVisibleRow);
public DataGridViewRowPrePaintEventArgs (System.Windows.Forms.DataGridView dataGridView, System.Drawing.Graphics graphics, System.Drawing.Rectangle clipBounds, System.Drawing.Rectangle rowBounds, int rowIndex, System.Windows.Forms.DataGridViewElementStates rowState, string errorText, System.Windows.Forms.DataGridViewCellStyle inheritedRowStyle, bool isFirstDisplayedRow, bool isLastVisibleRow);
public DataGridViewRowPrePaintEventArgs (System.Windows.Forms.DataGridView dataGridView, System.Drawing.Graphics graphics, System.Drawing.Rectangle clipBounds, System.Drawing.Rectangle rowBounds, int rowIndex, System.Windows.Forms.DataGridViewElementStates rowState, string? errorText, System.Windows.Forms.DataGridViewCellStyle inheritedRowStyle, bool isFirstDisplayedRow, bool isLastVisibleRow);
new System.Windows.Forms.DataGridViewRowPrePaintEventArgs : System.Windows.Forms.DataGridView * System.Drawing.Graphics * System.Drawing.Rectangle * System.Drawing.Rectangle * int * System.Windows.Forms.DataGridViewElementStates * string * System.Windows.Forms.DataGridViewCellStyle * bool * bool -> System.Windows.Forms.DataGridViewRowPrePaintEventArgs
Public Sub New (dataGridView As DataGridView, graphics As Graphics, clipBounds As Rectangle, rowBounds As Rectangle, rowIndex As Integer, rowState As DataGridViewElementStates, errorText As String, inheritedRowStyle As DataGridViewCellStyle, isFirstDisplayedRow As Boolean, isLastVisibleRow As Boolean)

Parameters

dataGridView
DataGridView

The DataGridView that owns the row that is being painted.

graphics
Graphics

The Graphics used to paint the DataGridViewRow.

clipBounds
Rectangle

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

rowBounds
Rectangle

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

rowIndex
Int32

The row index of the cell that is being painted.

rowState
DataGridViewElementStates

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

errorText
String

An error message that is associated with the row.

inheritedRowStyle
DataGridViewCellStyle

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

isFirstDisplayedRow
Boolean

true to indicate whether the current row is the first row currently displayed in the DataGridView; otherwise, false.

isLastVisibleRow
Boolean

true to indicate whether the current row is the last row in the DataGridView that has the Visible property set to true; otherwise, false.

Exceptions

dataGridView is null.

-or-

graphics is null.

-or-

inheritedRowStyle is null.

Applies to

See also