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

HTML Select getting width applied by RadFormDecorator

1 Answer 36 Views
FormDecorator
This is a migrated thread and some comments may be shown as answers.
Cole
Top achievements
Rank 1
Cole asked on 14 Jun 2012, 11:12 PM
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!

1 Answer, 1 is accepted

Sort by
0
Niko
Telerik team
answered on 18 Jun 2012, 11:02 AM
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.
Tags
FormDecorator
Asked by
Cole
Top achievements
Rank 1
Answers by
Niko
Telerik team
Share this question
or