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

RadNumericTextBox auto-resizing

11 Answers 141 Views
Input
This is a migrated thread and some comments may be shown as answers.
Jocelyn
Top achievements
Rank 1
Jocelyn asked on 27 Feb 2012, 02:12 PM
I have some NumericTextBox in a EditTemplate of a RadGrid. There is a strange behaviour with my NumericTextBox... When I mouse over the TextBox, the width lengthens for about 5-10 pixels.

What is the cause ?

11 Answers, 1 is accepted

Sort by
0
Richard
Top achievements
Rank 1
answered on 29 Feb 2012, 07:51 PM
Jocelyn:

Hovering over the RadNumericTextBox triggers the application of a different CSS class that is associated with the Hover event. If you use Firebug or some comparable Browser tool, you can select the rendered NumericTextBox in the edit form and trace the styles to see where the width changes.

See this forum thread for more insights:

Numeric Textbox losing css class on mouse over

You should be able to avoid this behavior by explicitly defining the width of the input in pixels at design time.

Hope this helps!
0
Jocelyn
Top achievements
Rank 1
answered on 29 Feb 2012, 08:52 PM
So what I understand is if I want to set the Width of my RadNumericTextBox in a edittemplate I have to first clear the width and set it to a value after that. Am I right? So I can't set the width directly on the asp page?
0
Richard
Top achievements
Rank 1
answered on 29 Feb 2012, 08:58 PM
Jocelyn:

You should be able to define a width in pixel units in the .aspx page and have it preserved.

Try this and let me know.

Regards,
0
Jocelyn
Top achievements
Rank 1
answered on 29 Feb 2012, 09:03 PM
<telerik:RadNumericTextBox ID="edIndiceCorp" runat="server" ReadOnly="true" Width="150px">
              <NumberFormat DecimalDigits="0" DecimalSeparator="." />
</telerik:RadNumericTextBox>

With or without Width I still get the same behaviour. The width lengthen for 5-10 pixels on mouse over.

But I can't tell you why this one don't have this behaviour:

<telerik:RadNumericTextBox ID="edTailleCm" runat="server" DbValue='<%# Bind("ppds_taille_cm") %>'
    DataType="System.String" Width="65" onkeyup="PoidsTaille_Changed(this.id, this.value)"
    ShowSpinButtons="true" NumberFormat-DecimalDigits="2" NumberFormat-DecimalSeparator="."
     autocomplete="off" MinValue="0">
              <IncrementSettings InterceptArrowKeys = "true" InterceptMouseWheel="true" />
              <ClientEvents OnValueChanged="PoidsTaille_OnValueChanged" />
</telerik:RadNumericTextBox>

It is also in the edit FormTemplate.
0
Richard
Top achievements
Rank 1
answered on 29 Feb 2012, 10:13 PM
Jocelyn:

The only difference I see in the two numeric textboxes is the manner in which you've applied the number formatting. The one that does not expand uses NumberFormat-DecimalDigits="2" NumberFormat-DecimalSeparator="."

While the other uses the <NumberFormat DecimalDigits="0" DecimalSeparator="." />

I'm not sure if this affects things. Otherwise, I'm stumped.

Sorry,
0
Jocelyn
Top achievements
Rank 1
answered on 01 Mar 2012, 02:22 PM
I found that with ShowSpinButtons="true" my NumericTextBox doesn't expand. But unfortunately, I don't want these SpinButton on each NumericTextBox. Do you have a clue on what is making this bad behaviour?
0
Milena
Telerik team
answered on 06 Mar 2012, 12:55 PM
Hello Jocelyn,

I tried to reproduce the unwanted behavior, but no avail. Attached you can find the project, which I used for testing, could you review it and let me know if I am missing something in replicating the issue.

Regards,
Milena
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Jocelyn
Top achievements
Rank 1
answered on 06 Mar 2012, 04:18 PM
Milena,

Yes this is working. For some reason, the strange behaviour disappeared, but I have some others behaviours that I don't understand and can't explain that I'll have to investigate.

Thanks.
0
Milena
Telerik team
answered on 09 Mar 2012, 02:00 PM
Hello,

I will be glad to help you in case you succeed in isolating the problem.

Please do not hesitate to contact us again.

Greetings,
Milena
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Sathish
Top achievements
Rank 1
answered on 14 Jul 2013, 02:18 PM
this issue happens when radformdecorator is enabled on all controls.

please let me know if there is a workaround.
0
Milena
Telerik team
answered on 17 Jul 2013, 12:57 PM
Hello,

The described scenario works with our latest official release Q2 2013. Please upgrade to it and let me know if the issue still exists on your end.

Regards,
Milena
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
Tags
Input
Asked by
Jocelyn
Top achievements
Rank 1
Answers by
Richard
Top achievements
Rank 1
Jocelyn
Top achievements
Rank 1
Milena
Telerik team
Sathish
Top achievements
Rank 1
Share this question
or