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

RadGrid with an inline RadNumericTextBox have text under spinbuttons

1 Answer 69 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Erik
Top achievements
Rank 2
Erik asked on 07 Nov 2008, 01:05 PM

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:

<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>  
<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>  
 

Why??

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

This is my declaration in the aspx:

<telerik:GridTemplateColumn HeaderText="Hatch" SortExpression="Luiknummer" UniqueName="Luiknummer" > 
    <ItemTemplate> 
        <asp:Label runat="server" ID="lbl_Luiknummer" Text='<%# Eval("Luiknummer", "{0:N0}") %>'></asp:Label> 
    </ItemTemplate> 
    <EditItemTemplate> 
        <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> 
        <asp:RequiredFieldValidator ID="RequiredFieldValidator_rnt_Luiknummer" runat="server" ErrorMessage="&nbsp;*" ControlToValidate="rnt_Luiknummer" Display="Dynamic" ></asp:RequiredFieldValidator>                      
    </EditItemTemplate> 
    <HeaderStyle HorizontalAlign="Right" Width="100px" /> 
    <ItemStyle HorizontalAlign="Right" /> 
</telerik:GridTemplateColumn> 
 

FYI: "Luiknummer" is "hatchnumber" in english... :-)

1 Answer, 1 is accepted

Sort by
0
Dimo
Telerik team
answered on 10 Nov 2008, 03:10 PM
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.
Tags
Grid
Asked by
Erik
Top achievements
Rank 2
Answers by
Dimo
Telerik team
Share this question
or