RadNumericTextBox auto-resizing

12 posts, 0 answers
  1. Jocelyn
    Jocelyn avatar
    148 posts
    Member since:
    Jul 2012

    Posted 27 Feb 2012 Link to this post

    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 ?
  2. jumpstart
    jumpstart avatar
    479 posts
    Member since:
    Nov 2011

    Posted 29 Feb 2012 Link to this post

    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!
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Jocelyn
    Jocelyn avatar
    148 posts
    Member since:
    Jul 2012

    Posted 29 Feb 2012 Link to this post

    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?
  5. jumpstart
    jumpstart avatar
    479 posts
    Member since:
    Nov 2011

    Posted 29 Feb 2012 Link to this post

    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,
  6. Jocelyn
    Jocelyn avatar
    148 posts
    Member since:
    Jul 2012

    Posted 29 Feb 2012 Link to this post

    <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.
  7. jumpstart
    jumpstart avatar
    479 posts
    Member since:
    Nov 2011

    Posted 29 Feb 2012 Link to this post

    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,
  8. Jocelyn
    Jocelyn avatar
    148 posts
    Member since:
    Jul 2012

    Posted 01 Mar 2012 Link to this post

    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?
  9. Milena
    Admin
    Milena avatar
    224 posts

    Posted 06 Mar 2012 Link to this post

    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.
  10. Jocelyn
    Jocelyn avatar
    148 posts
    Member since:
    Jul 2012

    Posted 06 Mar 2012 Link to this post

    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.
  11. Milena
    Admin
    Milena avatar
    224 posts

    Posted 09 Mar 2012 Link to this post

    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.
  12. Sathish
    Sathish avatar
    15 posts
    Member since:
    Dec 2010

    Posted 14 Jul 2013 Link to this post

    this issue happens when radformdecorator is enabled on all controls.

    please let me know if there is a workaround.
  13. Milena
    Admin
    Milena avatar
    224 posts

    Posted 17 Jul 2013 Link to this post

    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.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017