Export (0) Print
Expand All
Expand Minimize

DataGridView.PaintBackground Method

Note: This method is new in the .NET Framework version 2.0.

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
)

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 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 .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.

.NET Framework

Supported in: 2.0

Community Additions

ADD
Show:
© 2014 Microsoft