How to change the color of winform DataGridview header?

The way to do this is to set the EnableHeadersVisualStyles flag for the data grid view to False and set the background colour via the ColumnHeadersDefaultCellStyle. BackColor property. For example, to set the background colour to blue, use the following (or set in the designer if you prefer).

The way to do this is to set the EnableHeadersVisualStyles flag for the data grid view to False, and set the background colour via the ColumnHeadersDefaultCellStyle. BackColor property. For example, to set the background colour to blue, use the following (or set in the designer if you prefer): _dataGridView.

ColumnHeadersDefaultCellStyle. BackColor = Color. Blue; _dataGridView.

EnableHeadersVisualStyles = false; If you do not set the EnableHeadersVisualStyles flag to False, then the changes you make to the style of the header will not take effect, as the grid will use the style from the current users default theme. The MSDN documentation for this property is here.

Great that works! – programmernovice Aug 11 '09 at 21:40.

It can be done. From the designer: Select your DataGridView Open the Properties Navigate to ColumnHeaderDefaultCellStype t the button to edit the style. You can also do it programmatically: dataGridView1.

ColumnHeadersDefaultCellStyle. BackColor = Color. Purple; Hope that helps!

This is not a helpful to the question – Smith Jul 14 at 8:27.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions