Textbox Width Issues

2 posts, 0 answers
  1. Mike
    Mike avatar
    41 posts
    Member since:
    Aug 2011

    Posted 17 Feb 2014 Link to this post

    Can somebody explain to me why the width of any RadNumericTextbox or RadTextbox will appear to change when the page is rendering? It initially appears that the widths are completely off then just before rendering finishes, they resize to the proper width.

    I ask this because I am placing some generic RequiredFieldValidators beside these textboxes on my form and there is an unnecessary margin on the right side of each. If I set EnableSingleInputRendering = "False", the issue is resolved and there is only about a 5px padding vs. the nearly 30px margin otherwise. I'd prefer to understand what is actually different instead of just changing ever textbox on my form to turn Single Input Rendering off.

    I really don't like the experience of the widths changing at the last millisecond of rendering and I don't see any use for that additional space.
  2. Venelin
    Admin
    Venelin avatar
    352 posts

    Posted 20 Feb 2014 Link to this post

    Hi Robert,

    I'm not sure if we are talking about the same issue but onInitialize client-side event there are some javascript calculation performed that tend to equalize the width of RadTextBox in IE7 and other browsers. In other words - makes the control consistently looking in all browsers.  Yes, it might be possible to see small glitch during load that lasts few milliseconds. The effect, however, can be amplified if there is more padding in the text box, because then, the difference in box models in IE7 and standards-compliant browsers becomes more evident. You can overwrite the width using the !important clause to avoid this effect, but I wouldn't recommend this.

    You can also refer to this help topic: http://www.telerik.com/help/aspnet-ajax/input-css-width.html

    Regards,
    Venelin
    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 UI for ASP.NET AJAX, subscribe to the blog feed now.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top