DataGridView::RowPostPaint Event

 

Occurs after a DataGridViewRow is painted.

Namespace:   System.Windows.Forms
Assembly:  System.Windows.Forms (in System.Windows.Forms.dll)

public:
event DataGridViewRowPostPaintEventHandler^ RowPostPaint {
	void add(DataGridViewRowPostPaintEventHandler^ value);
	void remove(DataGridViewRowPostPaintEventHandler^ value);
}

You can handle this event alone or in combination with the RowPrePaint 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 DataGridViewRowPostPaintEventArgs class to paint other parts:

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

For more information about handling events, see NIB: Consuming Events.

The following code example demonstrates how to use a handler for the RowPostPaint event to paint textual content that spans the entire row below the normal cell values. This example is part of a larger example available in How to: Customize the Appearance of Rows in the Windows Forms DataGridView Control.

No code example is currently available or this language may not be supported.

.NET Framework
Available since 2.0
Return to top
Show: