AD
Administrator
Syncfusion Team
May 30, 2005 02:03 AM UTC
Try code like:
Font f = new Font("Courier", 14, FontStyle.Bold|FontStyle.Italic);
this.gridControl1.BaseStylesMap["Standard"].StyleInfo.Font.ModifyStyle(new GridFontInfo(f), Syncfusion.Styles.StyleModifyType.Changes);
KL
Ken Law
June 8, 2005 11:48 PM UTC
I put your code sample in the constructor of the control that hosts the GridControl so it runs after InitializeComponent. InitializeComponent contains the following code for the GridControl''s font property generated by the Property Browser. The font property code seems to take precedence over setting the Standard style in the BaseStylesMap.
Can you tell me the relationship between the grid''s font property and the styles? I would like to be able to control the font of row and column headers independently of the cell fonts.
Thanks.
AD
Administrator
Syncfusion Team
June 9, 2005 01:19 AM UTC
>>I would like to be able to control the font of row and column headers independently of the cell fonts.
The row and column styles (fonts) are controlled by grid.baseStylesMap["Row Header"].StyleInfo.Font and grid.baseStylesMap["Column Header"].StyleInfo.Font. Th etop-left cell is controlled by grid.baseStylesMap["Header"].StyleInfo.Font.