Start a new Forms application.
Add a DataGridView control to the Form.
Add a few Columns to the DataGridView.
In the properties window select the ColumnHeadersDefaultCellStyle (ahh what's in a name...) property.
A dialog opens. Change the appearance BackColor to whatever color you like.
Run the application. On my system I never get the chosen color for the column headers.
Anyone any ideas?
ddanbe 2,724 Professional Procrastinator Featured Poster
Recommended Answers
Jump to PostCheck for this (msdn):
If visual styles are enabled and EnableHeadersVisualStyles is set to true, all header cells except the TopLeftHeaderCell are painted using the current theme and the ColumnHeadersDefaultCellStyle values are ignored.
I've tried to set the EnableHeadersVisualStyles to false and it's working.
All 4 Replies
Ramy Mahrous 401 Postaholic Featured Poster
Antenka 274 Posting Whiz
ddanbe commented: Nice. +4
Ramy Mahrous 401 Postaholic Featured Poster
ddanbe 2,724 Professional Procrastinator Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.