I've set the divider width and divider height to non-zero and then used dataGridview1.GridColor = Color.Red
to set the color of the dividers. This doesn't affect the header though. How can I change the color of the gap between the header cells?; i.e. How can I make that gap Red also?
how to set the color of dividerwidth in column header
1.5k views Asked by 4mla1fn At
1
Update: The trick is to allow your own styles to be applied in the Headers. To do this you need this line to turn off the
EnableHeadersVisualStyles
flag:Without it the user settings are applied. See MSDN
Old answer:
You can always do stuff by owner-drawing the header cells.
Here is a short example: