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

How do I make the font bold in the column headers of a GridDataBoundGrid?

How do I make the font bold in the column headers of a GridDataBoundGrid?

-TC


2 Replies

NA Nisha Arockiya A Syncfusion Team October 29, 2008 11:49 AM UTC

Hi TC,

Thanks for your interest in Syncfusion products.



You can get things to work by handling the PrepareViewStyleInfo event and setting the style there. Here is a code snippet.





GridDataBoundGrid1.PrepareViewStyleInfo += new Syncfusion.Windows.Forms.Grid.GridPrepareViewStyleInfoEventHandler(GridDataBoundGrid1_PrepareViewStyleInfo);

private void GridDataBoundGrid1_PrepareViewStyleInfo(object sender, Syncfusion.Windows.Forms.Grid.GridPrepareViewStyleInfoEventArgs e)
{
if (e.ColIndex > 0 & e.RowIndex == 0)
{
e.Style.Font.Bold = true;
}
}


Please let me know if this helps.

Regards,
Nisha



AB abc October 30, 2008 05:00 PM UTC

Nisha,

That did help. Thank you.

-TC


Loader.
Live Chat Icon For mobile
Up arrow icon