Export (0) Print
Expand All
Expand Minimize

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);
}
/** @event */
public void add_RowPostPaint (DataGridViewRowPostPaintEventHandler value)

/** @event */
public void remove_RowPostPaint (DataGridViewRowPostPaintEventHandler value)

In JScript, you can handle the events defined by a class, but you cannot define your own.
Not applicable.

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.

Visual Studio 2005 Image Library
Visual Studio 2008 Image Library
Visual Studio Image Library

For more information about handling events, see 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.

Windows 98, Windows Server 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0

Community Additions

ADD
Show:
© 2014 Microsoft