Export (0) Print
Expand All
Expand Minimize

DataGridView.PaintBackground Method

Paints the background of the DataGridView.

Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in system.windows.forms.dll)

protected virtual void PaintBackground (
	Graphics graphics,
	Rectangle clipBounds,
	Rectangle gridBounds
)
protected void PaintBackground (
	Graphics graphics, 
	Rectangle clipBounds, 
	Rectangle gridBounds
)
protected function PaintBackground (
	graphics : Graphics, 
	clipBounds : Rectangle, 
	gridBounds : Rectangle
)
Not applicable.

Parameters

graphics

The Graphics used to paint the background.

clipBounds

A Rectangle that represents the area of the DataGridView that needs to be painted.

gridBounds

A Rectangle that represents the area in which cells are drawn.

The clipBounds parameter represents the area of the DataGridView that needs to be repainted. For example, if a user covers the entire DataGridView with another window and then uncovers it, then clipBounds represents the entire DataGridView. If a user covers a small area of the DataGridView and then uncovers it, then clipBounds represents the small area that was covered.

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