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

Grid Header Font

Thread ID:





22385 Dec 10,2004 01:30 PM Nov 10,2008 02:34 AM Windows Forms 3
Tags: GridControl
Administrator [Syncfusion]
Asked On December 10, 2004 01:30 PM

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 02:30 PM

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 03:57 AM

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 02:34 AM

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.

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.