RadGrid with an inline RadNumericTextBox have text under spinbuttons

2 posts, 0 answers
  1. Erik
    Erik avatar
    314 posts
    Member since:
    Feb 2008

    Posted 07 Nov 2008 Link to this post

    Hello,

    i have a simple grid with template columns. In the did template of a column i use a RadNumericTextBox.

    When editing, the spinbuttons display the text "Spin UpSpin Down" behind the spin images...

    when looking at the HTML i can see the following:

    1 <class="spinbutton up" href="javascript:void(0)" id="SN_Interface1_Content_102_SN_Planning_Unloading_AddEdit_HatchAddEdit1_RadGrid1_ctl00_ctl02_ctl03_rnt_Ton_SpinUpButton"><span>Spin Up</span></a>  
    2 <class="spinbutton down" href="javascript:void(0)" id="SN_Interface1_Content_102_SN_Planning_Unloading_AddEdit_HatchAddEdit1_RadGrid1_ctl00_ctl02_ctl03_rnt_Ton_SpinDownButton"><span>Spin Down</span></a>  
    3  

    Why??

    It ONLY happens in inline editing, when i use popup, its a goner...

    This is my declaration in the aspx:

    1 <telerik:GridTemplateColumn HeaderText="Hatch" SortExpression="Luiknummer" UniqueName="Luiknummer" > 
    2     <ItemTemplate> 
    3         <asp:Label runat="server" ID="lbl_Luiknummer" Text='<%# Eval("Luiknummer", "{0:N0}") %>'></asp:Label> 
    4     </ItemTemplate> 
    5     <EditItemTemplate> 
    6         <telerik:RadNumericTextBox ID="rnt_Luiknummer" runat="server" Type="Number" MaxValue="8" MinValue="1" MaxLength="1" ShowSpinButtons="True" NumberFormat-DecimalDigits="0" Skin="Office2007" DbValue='<%# Bind("Luiknummer") %>' Width="40px"></telerik:RadNumericTextBox> 
    7         <asp:RequiredFieldValidator ID="RequiredFieldValidator_rnt_Luiknummer" runat="server" ErrorMessage="&nbsp;*" ControlToValidate="rnt_Luiknummer" Display="Dynamic" ></asp:RequiredFieldValidator>                      
    8     </EditItemTemplate> 
    9     <HeaderStyle HorizontalAlign="Right" Width="100px" /> 
    10     <ItemStyle HorizontalAlign="Right" /> 
    11 </telerik:GridTemplateColumn> 
    12  

    FYI: "Luiknummer" is "hatchnumber" in english... :-)
  2. Dimo
    Admin
    Dimo avatar
    8332 posts

    Posted 10 Nov 2008 Link to this post

    Hi Proovit,

    The problem is caused by the ItemStyle HorizontalAlign property, which prevents the spin buttons' text-indent style from being applied correctly. The solution is to override the HorizontalAlign like this:


    .RadInput_Office2007 a
    {
        text-align:left;
    }

    (if you are using Telerik RadControls for ASP.NET AJAX Q3 2008)


    or


    .radInput_Office2007 a
    {
        text-align:left;
    }

    (if you are using an earlier version)


    All the best,
    Dimo
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top