This is a migrated thread and some comments may be shown as answers.

How to set radGridview column header text bold programmatically

1 Answer 1263 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Sunil
Top achievements
Rank 1
Sunil asked on 23 Dec 2009, 04:04 PM
Hi,

How can i make radGridview column header text bold programmatically?

1 Answer, 1 is accepted

Sort by
0
Jack
Telerik team
answered on 24 Dec 2009, 03:00 PM
Hi Sunil,

Thanks for contacting us.

You should handle ViewCellFormatting event and set the Font property:

Font myCustomFont = new Font(SystemFonts.DialogFont, FontStyle.Bold);
 
void radGridView1_ViewCellFormatting(object sender, CellFormattingEventArgs e)
{
    if (e.CellElement is GridHeaderCellElement)
    {
        e.CellElement.Font = myCustomFont;
    }
}

Hope this helps.

Best wishes,

Jack
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
GridView
Asked by
Sunil
Top achievements
Rank 1
Answers by
Jack
Telerik team
Share this question
or