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

Grid not honoring Font Size nor Family

1 Answer 98 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Patrice
Top achievements
Rank 1
Patrice asked on 04 Nov 2011, 05:13 PM
I have tried with a skin (Skin="Vista") and wihtout a skin (Skin="") to adjust Font and/or Font Family, and nothing affects thees font properties.
Stangely enough when I first set up the grid it had a few columns that I adjusted these properties on and had my col widths adjusted to look proper. Somewhere on down the line as I worked with the page converting the functions over from asp.net grid I noticed that the font size was larger.
First, I started at the MasterTableView Font-Size= 8, and nadda. I worked my way down the grid heirarchy to no avail.
Now other props work like strikethrough, Italic, underline. However, I did get a font size change on the header at the item level, but still no change in the item, edit, or footer templates.
I read quite a few posts about the skin overriding the properties, but this seems odd.

-Thank you
<telerik:RadGrid runat="server" ID="rgvPlan"
    OnUpdateCommand="rgvPlan_UpdateCommand"
    AllowFilteringByColumn="true"
    AllowMultiRowEdit="true"
    AllowPaging="true"
    AllowSorting="true"
    AutoGenerateColumns="false"
    PageSize="10" 
    Skin="Vista"
    PagerStyle-Mode="Slider"
    CellSpacing="0" 
    GridLines="Horizontal"
    ShowFooter="true"
    Width="720"
    Height="355px">
    <MasterTableView Width="700px"
        DataKeyNames="ListID"
        ClientDataKeyNames="ListID"
        EditMode="InPlace" Font-Names="Arial" Font-Size="8">
        <Columns>
            <telerik:GridEditCommandColumn ButtonType="LinkButton" ItemStyle-Width="60px" HeaderStyle-Width="60px"></telerik:GridEditCommandColumn>
            <telerik:GridButtonColumn CommandName="Delete" Text="Delete" UniqueName="DeleteColumn" ></telerik:GridButtonColumn>
            <telerik:GridTemplateColumn ItemStyle-HorizontalAlign="Right" HeaderText="Week Ending" ItemStyle-Width="50px" HeaderStyle-Width="50px" AllowFiltering="false" >
                <ItemTemplate>
                    <asp:LinkButton ID="lbWeekEndDate" OnClick="WeekEndDateChanged" runat="server" Text='<%# Bind("WeekEndDate", "{0:d}") %>'></asp:LinkButton>
                </ItemTemplate>
            </telerik:GridTemplateColumn>
            <telerik:GridTemplateColumn HeaderText="Fiscal M/Y" ItemStyle-Width="40px" HeaderStyle-Width="40px" AllowFiltering="false">
                <ItemTemplate>
                    <asp:Label ID="lblFsclMnthP" runat="server" Text='<%# Eval("FsclMnth") %>'></asp:Label>
                </ItemTemplate>
            </telerik:GridTemplateColumn>
            <telerik:GridTemplateColumn UniqueName="Network" HeaderText="Network  | Network Activity" AllowFiltering="true" HeaderStyle-Width="130px">
                <EditItemTemplate>
                    <asp:DropDownList ID="ddlNetwork" runat="server" DataSourceID="dsNetwork" SelectedValue='<%# Bind("NW_NWAct") %>'
                        DataTextField="NW_NWAct" DataValueField="NW_NWAct">
                    </asp:DropDownList>
                </EditItemTemplate>
                <ItemTemplate>
                    <asp:Label ID="Label7" runat="server" Text='<%# Eval("NW_NWAct") %>'></asp:Label>
                </ItemTemplate>
            </telerik:GridTemplateColumn>
            <telerik:GridTemplateColumn ItemStyle-Font-Size="XX-Small" UniqueName="Activity"  HeaderText="Activity" AllowFiltering="true" HeaderStyle-Width="110px">
                <EditItemTemplate>
                    <asp:DropDownList ID="ddlActivity" runat="server" DataSourceID="dsActivityType" SelectedValue='<%# Bind("ActivityType") %>'
                        ToolTip='<%# Bind("ActivityDesc") %>' DataTextField="ActivityType" DataValueField="ActivityType">
                    </asp:DropDownList>
                </EditItemTemplate>
                <ItemTemplate>
                    <asp:Label ID="Label8" runat="server" Text='<%# Eval("ActivityType") %>' ToolTip='<%# Eval("ActivityDesc") %>'> </asp:Label>
                </ItemTemplate>
            </telerik:GridTemplateColumn>
            <telerik:GridTemplateColumn UniqueName="Grade"  HeaderText="Grade" AllowFiltering="false">
                <EditItemTemplate>
                    <asp:TextBox ID="tbGrade" Text='<%# Bind("Grade") %>' runat="server" MaxLength="5"
                        Width="40"></asp:TextBox>
                </EditItemTemplate>
                <ItemTemplate>
                    <asp:Label ID="Label1" runat="server" Text='<%# Eval("Grade") %>'></asp:Label>
                </ItemTemplate>
            </telerik:GridTemplateColumn>
            <telerik:GridTemplateColumn UniqueName="STHours"  HeaderText="ST Hours"  AllowFiltering="false" ItemStyle-HorizontalAlign="Right">
                <EditItemTemplate>
                    <asp:TextBox runat="server" ID="tbSTHours" Text='<%# Bind("STHours") %>' Width="55"></asp:TextBox>
                </EditItemTemplate>
                <ItemTemplate>
                    <asp:Label ID="Label6" runat="server" Text='<%# Eval("STHours") %>'></asp:Label>
                </ItemTemplate>
                <FooterTemplate>
                    <strong><%#GetTotals("STHours", "P")%></strong>
                </FooterTemplate>
            </telerik:GridTemplateColumn>
            <telerik:GridTemplateColumn UniqueName="OTHours"  HeaderText="OT Hours" AllowFiltering="false" ItemStyle-HorizontalAlign="Right">
                <EditItemTemplate>
                    <asp:TextBox runat="server" ID="tbOTHours" Text='<%# Bind("OTHours") %>' Width="55"></asp:TextBox>
                </EditItemTemplate>
                <ItemTemplate>
                    <asp:Label ID="Label5" runat="server" Text='<%# Eval("OTHours") %>'></asp:Label>
                </ItemTemplate>
                <FooterTemplate>
                    <strong><%#GetTotals("OTHours", "P")%></strong>
                </FooterTemplate>
            </telerik:GridTemplateColumn>
            <telerik:GridTemplateColumn HeaderText="Total Hours" AllowFiltering="false" ItemStyle-HorizontalAlign="Right">
                <ItemTemplate>
                    <asp:Label ID="lblTotalHrs" runat="server" Text='<%# Eval("TotalHrs") %>'></asp:Label>
                </ItemTemplate>
                <FooterTemplate>
                    <strong><%#GetTotals("TotalHrs", "P")%></strong>
                </FooterTemplate>
            </telerik:GridTemplateColumn>
        </Columns>
    </MasterTableView>
      
    <StatusBarSettings LoadingText="Loading..." ReadyText="Ready" />
  
    <ClientSettings AllowColumnsReorder="False" ReorderColumnsOnClient="False"  >
        <Selecting AllowRowSelect="True" />
        <Scrolling  EnableVirtualScrollPaging="true" AllowScroll="true" UseStaticHeaders="True" />
    </ClientSettings>
  
    <FilterMenu EnableImageSprites="True" EnableRoundedCorners="true" ></FilterMenu>
 </telerik:RadGrid>

1 Answer, 1 is accepted

Sort by
0
Jayesh Goyani
Top achievements
Rank 2
answered on 05 Nov 2011, 07:07 AM
Hello,

try with below code snippet

<style type="text/css">
.RadGrid_Vista, .RadGrid_Vista .rgMasterTable, .RadGrid_Vista .rgDetailTable, .RadGrid_Vista .rgGroupPanel table, .RadGrid_Vista .rgCommandRow table, .RadGrid_Vista .rgEditForm table, .RadGrid_Vista .rgPager table, .GridToolTip_Vista
        {
            font :8px/12px "segoe ui",arial,sans-serif !important;
        }
</style>

 <telerik:RadGrid    Skin="Vista" >


Thanks,
Jayesh Goyani
Tags
Grid
Asked by
Patrice
Top achievements
Rank 1
Answers by
Jayesh Goyani
Top achievements
Rank 2
Share this question
or