954,500 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Change Color dataGridView

I wonder if it is possible to change the color on the headers on a dataGridView1.
I have searched in the members and properties but are not sure if I can find anything.
By default it seems that the headercolor is "Control".
Ex: is it possible to change the color to ::Gray ?

dataGridView1 ->Columnheader* // And perheps here change color
Jennifer84
Posting Pro
564 posts since Feb 2008
Reputation Points: 10
Solved Threads: 1
 

You can change column headers from the ColumnHeadersDefaultCellStyle property, but for it to work you have to set the EnableVisualStyles property to false.

Radical Edward
Posting Pro
545 posts since May 2008
Reputation Points: 361
Solved Threads: 97
 

That was the trick, thank you :)

You can change column headers from the ColumnHeadersDefaultCellStyle property, but for it to work you have to set the EnableVisualStyles property to false.
Jennifer84
Posting Pro
564 posts since Feb 2008
Reputation Points: 10
Solved Threads: 1
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You