System.Windows.Forms.DataGridView.RowPrePaint Event

Occurs before a System.Windows.Forms.DataGridViewRow is painted

Syntax

public event DataGridViewRowPrePaintEventHandler RowPrePaint

Remarks

You can handle this event alone or in combination with the DataGridView.RowPostPaint event to customize the appearance of rows in the control. You can paint entire rows yourself, or paint specific parts of rows and use the following methods of the System.Windows.Forms.DataGridViewRowPrePaintEventArgs class to paint other parts:

You can also use the System.Windows.Forms.VisualStyles.VisualStyleRenderer class to paint standard controls using the current theme. For more information, see Rendering Controls with Visual Styles. If you are using vsprvslong, you also have access to a large library of standard images that you can use with the System.Windows.Forms.DataGridView control.

vsimagelibrary

For more information about handling events, see Consuming Events.

Requirements

Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
Assembly Versions: 2.0.0.0
Since: .NET 2.0