Articles in this section

How to set the background color for WinForms GridControl?

Background settings


To set the back color for the area of the Grid populated by cells, you must set the grid.BackColor property to the color. The back color for the client area of the Grid is set by the BackgroundColor property where there are no cells and no scrollbars.

//set the backcolor for the grid
gridControl1.BackColor = Color.LightGreen;

//set the backcolor for the gridclient area
gridControl1.Properties.BackgroundColor = Color.LightCyan;
'set the backcolor for the grid
gridControl1.BackColor = Color. LightGreen

'set the backcolor for the gridclient area
gridControl1.Properties.BackgroundColor = Color. LightCyan


After applying the properties, the Grid is shown as follows,

 

Set the background color to GridControl


Figure
1: Setting the backcolor for the Grid

 

Samples:

C#: BackGround color_for_grid

VB: BackGround color_for_grid

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Access denied
Access denied