Category / Section
How to set transparent backcolor for WinForms GridControl?
1 min read
The GridControl supports the TransparentBackground property and BackColor property to set the transparent background color of the grid.
For example, you can set transparent BackColor of GridControl with the following code,
C#
//set up the transparent background gridControl1.TransparentBackground = true; gridControl1.SupportsTransparentBackColor = true; //set the color for the transparent background gridControl1.Properties.BackgroundColor = Color.FromArgb(0, 1, 1, 1); gridControl1.BackColor = Color.FromArgb(0,SystemColors.Window);
VB
'set up the transparent background gridControl1.TransparentBackground = True gridControl1.SupportsTransparentBackColor = True 'set the color for the transparent background gridControl1.Properties.BackgroundColor = Color.FromArgb(0, 1, 1, 1) gridControl1.BackColor = Color.FromArgb(0,SystemColors.Window)
After applying the transparent properties, the grid is shown below,
Samples: