Provides data for the CellPainting event.
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
Gets the border style of the current DataGridViewCell.
Get the bounds of the current DataGridViewCell.
Gets the cell style of the current DataGridViewCell.
Gets the area of the DataGridView that needs to be repainted.
Gets the column index of the current DataGridViewCell.
Gets a string that represents an error message for the current DataGridViewCell.
Gets the formatted value of the current DataGridViewCell.
Gets or sets a value that indicates whether the event handler has completely handled the event or whether the system should continue its own processing.(Inherited from HandledEventArgs.)
The cell parts that are to be painted.
Gets the row index of the current DataGridViewCell.
Gets the state of the current DataGridViewCell.
Gets the value of the current DataGridViewCell.
Determines whether the specified object is equal to the current object.(Inherited from Object.)
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.(Inherited from Object.)
Serves as the default hash function. (Inherited from Object.)
Paints the specified parts of the cell for the area in the specified bounds.
Paints the cell background for the area in the specified bounds.
Paints the cell content for the area in the specified bounds.
Returns a string that represents the current object.(Inherited from Object.)
The CellPainting event is raised for each DataGridViewCell that is visible on a DataGridView. To improve performance, set the properties in a to change the appearance of the cell instead of directly accessing a cell in the DataGridView. If you manually paint the cell, set the HandledEventArgs.Handled property to true. If you do not set HandledEventArgs.Handled to true, the cell will paint over your customizations.
The following code example illustrates the use of this type. For more information, see How to: Customize the Appearance of Cells in the Windows Forms DataGridView Control.
Available since 2.0