HTML Select getting width applied by RadFormDecorator

2 posts, 0 answers
  1. Cole
    Cole avatar
    2 posts
    Member since:
    Mar 2012

    Posted 14 Jun 2012 Link to this post

    I have an ASP:DropDownList that is being styled using the RadFormDecorator.  After the decorator has finished, there is a style width attribute applied that I have not set.  Does anyone know if 1) there is a way to prevent this from happening, or 2) an event that fires after the RadFormDecorator has finished decorating all the controls so that I can then go in and remove the width attribute.

    Any help would be much appreciated!

    Thanks!
  2. Niko
    Admin
    Niko avatar
    387 posts

    Posted 18 Jun 2012 Link to this post

    Hello Jerome,

    Unfortunately there is no practical way of preventing this from happening.
    Nevertheless you can use the standard event from the client-side page lifecycle - Sys.Application.add_load, to remove the width styling.
    Sys.Application.add_load(function()
    {
        var decoratedSelect = Telerik.Web.UI.RadFormDecorator.getDecoratedElement(select);
        console.log(decoratedSelect.style.width);
    });

    Hope this helps.

    Regards,
    Niko
    the Telerik team
    Explore the entire set of ASP.NET AJAX controls we offer here and browse the myriad online demos to learn more about the components and the features they incorporate.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top