Occurs before a cell is painted.
[Visual Basic] Public Event CellPrePaint As DataGridViewCellPaintEventHandler [C#] public event DataGridViewCellPaintEventHandler CellPrePaint; [C++] public: __event DataGridViewCellPaintEventHandler* CellPrePaint;
The event handler receives an argument of type DataGridViewCellPaintEventArgs containing data related to this event. The following DataGridViewCellPaintEventArgs property provides information specific to this event.
Property | Description |
---|---|
Cell | Gets the cell that is being drawn. |
CellBounds | Get the bounds of the cell. |
CellContentBounds | Get the bounds of the cell content. |
CellState | Gets the graphical state of the cell. |
ClipRectangle | Gets the area of the DataGridView that needs to be repainted. |
Graphics | Gets the Graphics used to paint the cell. |
Handled | Gets or sets a value indicating whether the event handler has completely handled the event or whether the system should continue its own paint processing. |
Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows .NET Server family
DataGridView Class | DataGridView Members | Wimark.Controls Namespace