|
-
February 19th, 2009, 11:35 AM
#1
DataGrid
Hi
Does any one know how to change the back ground color of individual column header in a datagrid. I know how to change the background color of all the column headers but not individuallly...
Example - I want my column 1 header to be displayed Red and Column 2 header to be displayed Green
Thanks in advance
Any idea??
-
February 19th, 2009, 03:28 PM
#2
Re: DataGrid
As the datagridview only has one property for setting the defaultHeaderCellStyle IMHO it will not be possible to get this done in a standard way.
Try if you can do it when using ownerdrawing the headers and look if there is a possibility so you will know which column is just painted.
If so you will be able to create your own datagridviw derived from the original one and there adding a property for a second color an ownerdrawing all that
 Jonny Poet
To be Alive is depending on the willingsness to help others and also to permit others to help you. So lets be alive. !
Using Code Tags makes the difference: Code is easier to read, so its easier to help. Do it like this: [CODE] Put Your Code here [/code]
If anyone felt he has got help, show it in rating the post.
Also dont forget to set a post which is fully answered to 'resolved'. For more details look to FAQ's about Forum Usage. BTW I'm using Framework 3.5 and you ?
My latest articles :
Creating a Dockable Panel-Controlmanager Using C#, Part 1 | Part 2 | Part 3 | Part 4 | Part 5 | Part 6 | Part 7
-
February 19th, 2009, 03:36 PM
#3
Re: DataGrid
many thanks for the reply jonny...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|