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

Grid Header Font

Thread ID:





22385 Dec 10,2004 06:30 PM UTC Nov 10,2008 07:34 AM UTC WinForms 3
Tags: GridControl
Administrator [Syncfusion]
Asked On December 10, 2004 06:30 PM UTC

Hi there, I am trying to set the font for the header cell. However, when I try to set it the first time, it is ok. Setting it the second time doesn''t seem to have any effect on the heder cells.

Administrator [Syncfusion]
Replied On December 10, 2004 07:30 PM UTC

Hi Patrick, are you referring to the design-time or changing headers with code? If code, can you post code snippets? Which version of Essential Grid and which .NET Framework version are you using? Thank You, Stefan

Administrator [Syncfusion]
Replied On November 9, 2008 08:57 AM UTC

hi;i have the same problem.i used a DataBoundGrid .i want to change the header font to "tahoma". how can i do this?

Nisha Arockiya A [Syncfusion]
Replied On November 10, 2008 07:34 AM UTC

Hi Shayesteh,

You can achieve this by handling PrepareViewStyleInfo event. In the event handler check for the e.RowIndex and e.ColIndex and set the font.
Here is the code snippet.

void gridDataBoundGrid1_PrepareViewStyleInfo(object sender, GridPrepareViewStyleInfoEventArgs e)
if (e.RowIndex == 0 && e.ColIndex > 0)
e.Style.Font = new GridFontInfo(new Font("Tahoma", 10, FontStyle.Italic));

Please let me know if this serve your neeeds.



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