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
close icon

GridDataBoundGrid Header Font

Pardon me if it sounds stupid .. but how do i change the column header font in GridDataBoundGrid. Tried changing Font property in GridDataBoundGrid, GridBoundColumn, BaseStyleMap, TableStyle but still no luck... Regards Yogi

5 Replies

AD Administrator Syncfusion Team January 5, 2005 11:55 AM UTC

Some Additional information.. I am using SyncFusion 3.1 and this grid is binded with a typed dataset.


AD Administrator Syncfusion Team January 5, 2005 12:17 PM UTC

Using the BaseStyleMap should work (unless something is resetting it later say in PrepareViewStyleInfo or Model.QueryCellInfo). this.gridDataBoundGrid1.BaseStylesMap["Column Header"].StyleInfo.Font.Italic = true;


AD Administrator Syncfusion Team January 5, 2005 01:18 PM UTC

So its a bug.. if i change the font using the property window.. the changes don''t get applied ( i don''t see code generated in initializecomponentmethod )...but it works if i explicitly add the following code in initializecomponent() this.gridDataBoundGrid1.BaseStylesMap["Column Header"].StyleInfo.Font.Facename = "Tahoma"; this.gridDataBoundGrid1.BaseStylesMap["Column Header"].StyleInfo.Font.Size = 12; Regards Yogi


AD Administrator Syncfusion Team January 5, 2005 03:11 PM UTC

Using 3010, if I open up the DataBoundSortByDisplayMember sample, and make the changes you mentioned to the BaseStylesMap in the designer, I see the font change on the design surface, and it stays changed at runtime as well. If you try to change the font in this DataBoundSortByDisplayMember sample, does it change for you. If so, there must be something particular to your project that is triggerring this problem. Can you upload a sample project that fails so we can try to spot the problem so it can be addressed?


AD Administrator Syncfusion Team January 5, 2005 03:58 PM UTC

Pretty wierd.. it seems soemthing to do with my configuration.. i opened up the DataBoundSortByDisplayMember sample and changed the font as explained by you.. no luck... Regards Yogesh S

Loader.
Live Chat Icon For mobile
Up arrow icon