The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
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?
ADAdministrator Syncfusion Team June 2, 2005 01:46 PM UTC
The TableStyle does not apply to the headers. Instead, try setting grid.BaseStylesMap["Header"].StyleInfo.Interior (or BackColor).
RSRoumen StoyanovJune 14, 2005 04:12 PM UTC
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).
ADAdministrator Syncfusion Team June 14, 2005 04:27 PM UTC
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.