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
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

GridDataBoundGrid Header Font

Thread ID:





23122 Jan 5,2005 11:49 AM UTC Jan 5,2005 03:58 PM UTC WinForms 5
Tags: GridControl
Administrator [Syncfusion]
Asked On January 5, 2005 11:49 AM UTC

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

Administrator [Syncfusion]
Replied On 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.

Administrator [Syncfusion]
Replied On 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;

Administrator [Syncfusion]
Replied On 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

Administrator [Syncfusion]
Replied On 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?

Administrator [Syncfusion]
Replied On 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


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon