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

Column Header Font larger than the rest of the columns when using GridTemplateColumns

3 Answers 59 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Jay
Top achievements
Rank 1
Jay asked on 10 Jun 2009, 01:27 PM
I am using a RadGrid where I have 3 columns. The first is a GridBoundColumn and the last 2 are GridTemplateColumns with ItemTemplates. When my grid paints, I get one font size for the BoundColumn and a much larger font size for the TemplateColumns?

I have tried using a CSS on them but it seems to mess up the way the grid lines look for the header and such and even used the HeaderStyle-FontSize property, which it seems to ignore.

Anyone know how to handle this?

thanks, Jay

3 Answers, 1 is accepted

Sort by
0
Dimo
Telerik team
answered on 11 Jun 2009, 06:23 AM
Hi Jason,

The problem could be caused by two things:

1) You have <table> elements inside the ItemTemplates and the web page is running in quirks mode (no XHTML DOCTYPE). In this case tables don't inherit font styles as expected and you need to define the styles directly for the tables, for example:

CSS

table
{
      font-size: 12px;
}

or

HTML

<table style="font-size:12px">


2) You have some custom CSS styles for <table>s which are applied to the <table> elements inside the ItemTemplate. You will need to modify or override those styles, until you achieve the desired look.


Best wishes,
Dimo
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Ajay Gandhi
Top achievements
Rank 1
answered on 08 Apr 2010, 11:39 PM
Doesnt work for me too. Below is my code snippet. Please help. The font for column 'Rationale' is a little bigger than the rest of the columns.

    <asp:UpdatePanel ID="UpdatePanel4" runat="server" UpdateMode="Conditional">  
        <ContentTemplate>          
            <br /> 
            <telerik:RadGrid ID="rgStandard" runat="server" AllowPaging="True" AutoGenerateColumns="false" AllowSorting="True" Width="100%" AlternatingItemStyle-HorizontalAlign="Center" AlternatingItemStyle-VerticalAlign="Top" ItemStyle-VerticalAlign="Top" HeaderStyle-Font-Bold="true" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center">  
                <MasterTableView> 
                    <HeaderStyle Font-Size="Small" /> 
                    <Columns> 
                        <telerik:GridBoundColumn HeaderText="Release" DataField="ReleaseCode" /> 
                        <telerik:GridBoundColumn HeaderText="Standard Label" DataField="Label" /> 
                        <telerik:GridBoundColumn HeaderText="Program" DataField="ProgramCode" /> 
                        <telerik:GridBoundColumn HeaderText="Chapter" DataField="ChapterLabel" /> 
                        <telerik:GridBoundColumn HeaderText="Standard Text" DataField="StandardText" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="500px" /> 
                        <telerik:GridTemplateColumn HeaderText="Rationale">  
                            <ItemTemplate> 
                                <asp:Image ID="imgRationale" Runat="server" ImageUrl='<%# BindRationale(DataBinder.Eval(Container, "DataItem.Rationale")) %>'></asp:Image> 
                            </ItemTemplate> 
                        </telerik:GridTemplateColumn> 
                    </Columns> 
                </MasterTableView> 
                <ClientSettings> 
                    <Selecting AllowRowSelect="True" /> 
                    <Scrolling AllowScroll="True" UseStaticHeaders="True" /> 
                </ClientSettings> 
            </telerik:RadGrid> 
        </ContentTemplate> 
        <Triggers> 
            <asp:AsyncPostBackTrigger ControlID="ucStandard1" /> 
        </Triggers> 
    </asp:UpdatePanel> 
0
Dimo
Telerik team
answered on 09 Apr 2010, 07:34 AM
Hi Ajay,

As far as I can see, the Rationale column contains just an image. What font size are you talking about? Do the images appear?

Regards,
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.
Tags
Grid
Asked by
Jay
Top achievements
Rank 1
Answers by
Dimo
Telerik team
Ajay Gandhi
Top achievements
Rank 1
Share this question
or