We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

row/col header backcolor

I am trying to change the color of the row/col header on a gridcontrol. I have tried TableStyle.Interior but when I print the grid it still prints the default gradient design, any ideas?

3 Replies

AD Administrator Syncfusion Team June 2, 2005 08:46 AM

The TableStyle does not apply to the headers. Instead, try setting grid.BaseStylesMap["Header"].StyleInfo.Interior (or BackColor).


RS Roumen Stoyanov June 14, 2005 11:12 AM

Setting grid.BaseStylesMap["Header"].StyleInfo.BackColor didn''t work for me. The header stil displays grey (Control) and grid.BaseStylesMap["Header"].StyleInfo.Interior.BackColor is read only. Any other suggestions? Thanks. >The TableStyle does not apply to the headers. Instead, try setting grid.BaseStylesMap["Header"].StyleInfo.Interior (or BackColor).


AD Administrator Syncfusion Team June 14, 2005 11:27 AM

That is the way to do it. Here is a sample. http://www.syncfusion.com/Support/user/uploads/Headers_e4adede6.zip Are you handling any events like PrepareViewStyleInfo or QueryCellInfo that might be interfering with setting the header backcolor? Also, if you are also setting the "Column Header" or "Row Header" basestyles, these will step on the "Header" basestyle setting. If you want to set a gradient header back color, then you should not set style.BackColor. Instead, set style.Interior where you can create a BrushInfo object that support gradients.

Loader.
Live Chat Icon For mobile
Up arrow icon