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

Headerstyle-Css is not working

4 Answers 164 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Mona
Top achievements
Rank 1
Mona asked on 20 Oct 2010, 12:55 PM
Hello All,

I have a RadGrid and I have assigned HeaderStyle-CssClass="Font12px" and AllowSorting="true" but the font size is not set to 12px.
Suggest me how can I maintain the font size to the headers.

4 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 20 Oct 2010, 01:09 PM
Hello Mona,

Try HeaderStyle-Font-Size property of Radgrid to set the font size for headers.

ASPX:
<telerik:RadGrid ID="RadGrid1" runat="server" HeaderStyle-Font-Size="20px">

Thanks,
Princy.
0
Mona
Top achievements
Rank 1
answered on 20 Oct 2010, 01:40 PM
This is not working when used with AllowSorting="true", I read many comments that the headerstyle property get overwitten if used with AllowSorting=true
0
Accepted
Dimo
Telerik team
answered on 20 Oct 2010, 05:32 PM
Hello Mona,

Actually the default RadGrid font size is 12px, so no need to set it again. However, if you are setting color or text-decoration styles, they will not be applied to sortable columns, because <a> elements do not inherit such styles and you have <a> elements inside the RadGrid header cells when a given column is sortable.

So you should use something like this:

div.RadGrid  .MyCustomHeaderClass  a
{
         color: #f00 ;
         text-decoration: underline ;
}


Best wishes,
Dimo
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Mona
Top achievements
Rank 1
answered on 21 Oct 2010, 09:36 AM
Thanks, now its working fine.
Tags
Grid
Asked by
Mona
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Mona
Top achievements
Rank 1
Dimo
Telerik team
Share this question
or