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

font size problem

1 Answer 129 Views
Grid
This is a migrated thread and some comments may be shown as answers.
John Davis
Top achievements
Rank 2
John Davis asked on 11 Aug 2008, 01:26 PM
I am trying to set font size X-Small for all cells.  I get this size in the command template and in the headers for the columns.  But font size of data in cells is bigger.  How can I fix it?  HTML for the radgrid is below.

<

rad:RadGrid ID="RadGrid1" AllowMultiRowSelection="True" Skin="WebBlue" runat="server"

AllowAutomaticDeletes="True" Width="999px" PageSize="40" AllowPaging="True" AutoGenerateColumns="False"

DataSourceID="ObjDataSource1" ShowStatusBar="True" EnableAJAX="true" EnableAJAXLoadingTemplate="true"

LoadingTemplateTransparency="50" OnPreRender="RadGrid1_PreRender" OnItemCreated="RadGrid1_ItemCreated"

OnDeleteCommand="RadGrid1_DeleteCommand" OnUpdateCommand="RadGrid1_UpdateCommand"

OnInsertCommand="RadGrid1_InsertCommand" OnItemCommand="RadGrid1_ItemCommand"

OnItemDataBound="RadGrid1_ItemDataBound" GridLines="None" Font-Bold="False"

Font-Italic="False" Font-Overline="False" Font-Size="X-Small"

Font-Strikeout="False" Font-Underline="False">

<AlternatingItemStyle Font-Bold="False" Font-Italic="False"

Font-Overline="False" Font-Size="X-Small" Font-Strikeout="False"

Font-Underline="False" Wrap="True" />

<ItemStyle Font-Bold="False" Font-Italic="False" Font-Overline="False"

Font-Size="X-Small" Font-Strikeout="False" Font-Underline="False"

Wrap="True" />

<PagerStyle Mode="Slider" />

<ClientSettings>

<Selecting AllowRowSelect="true" />

<Scrolling AllowScroll="True" UseStaticHeaders="True" SaveScrollPosition="True"></Scrolling>

</ClientSettings>

<MasterTableView CommandItemDisplay="Top" DataKeyNames="SCS_SKU_ID" DataSourceID="ObjDataSource1"

EditMode="EditForms" AutoGenerateColumns="False" Width="100%"

TableLayout="Fixed" font-bold="False" font-italic="False" font-overline="False"

font-size="X-Small" font-strikeout="False" font-underline="False" >

<RowIndicatorColumn Visible="False">

<HeaderStyle Width="20px"></HeaderStyle>

</RowIndicatorColumn>

<ExpandCollapseColumn Visible="False" Resizable="False">

<HeaderStyle Width="20px"></HeaderStyle>

</ExpandCollapseColumn>

<Columns>

<rad:GridBoundColumn Visible="False" DataField="SCS_SKU_ID" HeaderText="SCS_SKU_ID"

UniqueName="SCS_SKU_ID" ReadOnly="true" />

<rad:GridBoundColumn DataField="SKU_NameUsedBySCS" HeaderText="SCS_SKU#"

UniqueName="SKU_NameUsedBySCS" >

</rad:GridBoundColumn>

<rad:GridBoundColumn DataField="SCS_ProcGroup_Name" ReadOnly="True" HeaderText="PGC"

UniqueName="SCS_ProcGroup_Name" >

</rad:GridBoundColumn>

<rad:GridBoundColumn DataField="SCS_ProcGroup2_Name" ReadOnly="True" HeaderText="PGC2"

UniqueName="SCS_ProcGroup_Name" >

</rad:GridBoundColumn>

<rad:GridBoundColumn DataField="LowestBatchQty" HeaderText="LBQ"

UniqueName="LowestBatchQty" >

</rad:GridBoundColumn>

<rad:GridBoundColumn DataField="RequiredCapacityRCAP" HeaderText="RCAP"

UniqueName="RequiredCapacityRCAP" >

</rad:GridBoundColumn>

<rad:GridBoundColumn DataField="BatchIncrementQty" HeaderText="BIQ"

UniqueName="BatchIncrementQty" >

</rad:GridBoundColumn>

<rad:GridBoundColumn DataField="EndOfDistribution" HeaderText="EOD"

UniqueName="EndOfDistribution" >

</rad:GridBoundColumn>

<rad:GridBoundColumn DataField="Yield" HeaderText="Yield" UniqueName="Yield" >

</rad:GridBoundColumn>

<rad:GridCheckBoxColumn

UniqueName="ActiveYN"

HeaderText="Active"

DataField="ActiveYN">

</rad:GridCheckBoxColumn>

<rad:GridBoundColumn DataField="LeadTime" HeaderText="LT" UniqueName="LeadTime" >

</rad:GridBoundColumn>

<rad:GridBoundColumn DataField="Cost" HeaderText="Cost" DataFormatString=" {0:N2}"

UniqueName="Cost" >

</rad:GridBoundColumn>

<rad:GridBoundColumn DataField="Opt" HeaderText="SCS_SKU" UniqueName="Opt" >

</rad:GridBoundColumn>

<rad:GridBoundColumn DataField="SKU_ID" ReadOnly="True" HeaderText="SC_SKU_ID"

UniqueName="SKU_ID" >

</rad:GridBoundColumn>

<rad:GridBoundColumn DataField="SKU_Name" ReadOnly="True" HeaderText="SKU"

UniqueName="SKU_Name" >

</rad:GridBoundColumn>

<rad:GridBoundColumn DataField="OnHandActual" HeaderText="TBOH"

UniqueName="OnHandActual" >

</rad:GridBoundColumn>

<rad:GridBoundColumn DataField="WorkInProcessA" HeaderText="WIPa"

UniqueName="WorkInProcessA" >

</rad:GridBoundColumn>

<rad:GridBoundColumn DataField="WorkInProcessB" HeaderText="WIPb"

UniqueName="WorkInProcessB" >

</rad:GridBoundColumn>

<rad:GridBoundColumn DataField="PurchaseOrder" HeaderText="DI"

UniqueName="PurchaseOrder" >

</rad:GridBoundColumn>

<rad:GridBoundColumn DataField="Allocation" HeaderText="DO"

UniqueName="Allocation" >

</rad:GridBoundColumn>

<rad:GridBoundColumn DataField="AverageDailyDemand" ReadOnly="True" HeaderText="DOSr"

UniqueName="AverageDailyDemand" DataFormatString=" {0:N2}" >

</rad:GridBoundColumn>

<rad:GridButtonColumn ButtonType="ImageButton" ImageUrl="~/Images/Forecast.gif" CommandName="Fcst"

Text="Forecast" UniqueName="F">

</rad:GridButtonColumn>

<rad:GridButtonColumn ButtonType="ImageButton" ImageUrl="~/Images/ForecastCalc.gif"

CommandName="FcstC" Text="ForecastCalc" UniqueName="FC">

</rad:GridButtonColumn>

<rad:GridButtonColumn ConfirmText="Delete?" ButtonType="ImageButton" ImageUrl="~/Images/Delete.gif"

CommandName="Delete" Text="Delete" UniqueName="DeleteColumn">

</rad:GridButtonColumn>

<rad:GridButtonColumn ButtonType="ImageButton" ImageUrl="~/Images/Edit.gif" CommandName="Edit"

Text="Edit" UniqueName="EditColumn">

</rad:GridButtonColumn>

</Columns>

<ItemStyle Font-Bold="False" Font-Italic="False" Font-Overline="False"

Font-Size="X-Small" Font-Strikeout="False" Font-Underline="False"

Wrap="True" />

<AlternatingItemStyle Font-Bold="False" Font-Italic="False"

Font-Overline="False" Font-Size="X-Small" Font-Strikeout="False"

Font-Underline="False" Wrap="True" />

<CommandItemTemplate>

<div style="padding: 10px 0px;">

&nbsp;&nbsp;

<asp:LinkButton ID="LinkButtonAddNew" Font-Size="X-Small" runat="server" CommandName="InitInsert"><img style="border:0px;vertical-align:middle;" alt="" src="Images/AddRecord.gif" />

Add new

</asp:LinkButton>

&nbsp;

<asp:LinkButton ID="lbAA" Font-Size="X-Small" runat="server" CommandName="AA"><img style="border:0px;vertical-align:middle;" alt="" src="Images/Checked.gif" />

Activate All

</asp:LinkButton>

&nbsp;

<asp:LinkButton ID="LinkButtonDeleteSelected" Font-Size="X-Small" OnClientClick="javascript:return confirm('Delete selected items?')"

runat="server" CommandName="DeleteSelected" CausesValidation="false"><img style="border:0px;vertical-align:middle;" alt="" src="Images/Delete.gif" />

Delete Selected

</asp:LinkButton>

&nbsp;&nbsp;&nbsp;

<asp:LinkButton ID="LinkButtonRefresh" Font-Size="X-Small" runat="server" CommandName="RebindGrid"><img style="border:0px;vertical-align:middle;" alt="" src="Images/Refresh.gif" />

Refresh

</asp:LinkButton>

<asp:CheckBox ID="chkShowInactivesInGrid" style="vertical-align:bottom;width:22;height:22;"

Text="Show Inactive" runat="server" Font-Size="X-Small" />

</div>

</CommandItemTemplate>

</MasterTableView>

</rad:RadGrid>

1 Answer, 1 is accepted

Sort by
0
Dimo
Telerik team
answered on 11 Aug 2008, 02:07 PM
Hello John Davis,

In order to ensure consistent cross-browser look of RadGrid in both standards mode and quirks mode, the font-size in all skins is defined for the control's wrapping <div> and all table elements, for example:

.RadGrid_WebBlue,
.MasterTable_WebBlue,
.DetailTable_WebBlue,
.GroupPanel_WebBlue table,
.GridEditForm_WebBlue table
{
font:11px arial,tahoma,sans-serif;
}
In order to override the above, I recommend using the following approach:

ASPX/ASCX

<telerik:RadGrid  Skin="WebBlue"  CssClass="SmallFont"  />


CSS
div.SmallFont,
.SmallFont .MasterTable_WebBlue,
.SmallFont .DetailTable_WebBlue,
.SmallFont .GroupPanel_WebBlue table,
.SmallFont .GridEditForm_WebBlue table
{
font-size: x-small;
}

Regards,
Dimo
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Grid
Asked by
John Davis
Top achievements
Rank 2
Answers by
Dimo
Telerik team
Share this question
or