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

RadFormDecorator does not decorate input type=button when class attribute is present

1 Answer 81 Views
FormDecorator
This is a migrated thread and some comments may be shown as answers.
Tele
Top achievements
Rank 1
Tele asked on 07 Jun 2013, 11:46 AM
RadFormDecorator does not decorate input type=button when class attribute is present.
Demo below.
Regards

<%@ Page Title="" Language="C#" MasterPageFile="~/TestUnit/TelerikBug/DecoratedButtonMaster.Master" AutoEventWireup="true" CodeBehind="DecoratedButton.aspx.cs" Inherits="TestUnit.TelerikBug.DecoratedButton" %>
 
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
 
    <script type="text/javascript" src="jquery-1.8.3.js"></script>
 
</asp:Content>
 
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
 
    <div id="addbuttonpanelid">
 
        <input type="button" id="button20" value="bugdecoratedbutton"  class="bug"/><br />
        <input type="button" id="button1" value="decoratedbutton"/><br />
        <input type="button" id="button5" disabled="disabled" value="decorateddisabledbutton" class="bug"/><br />
 
    </div>
 
    <script type="text/javascript">
 
 
        $(document).ready(
            function () {
 
                $("<br/>")
                    .appendTo("#addbuttonpanelid");
 
                $("<input type='button' id='button2' value='afterready'/>")
                    .appendTo("#addbuttonpanelid");
 
                $("#button1").click(function () {
 
                    $('#button5').removeAttr('disabled');
 
                    $("<input type='button' id='button3' value='onclick'/>")
                    .appendTo("#addbuttonpanelid");
                     
                    $("<input type='button' id='button6' disabled='disabled' value='onclick'/>")
                    .appendTo("#addbuttonpanelid");
 
                    $("<input type='button' id='button10id' name='voter' value='VOTER' class='bug'/>")
                    .appendTo("#addbuttonpanelid");
                     
 
                    var decorator = $find("RadFormDecoratorID");
                    if (decorator) {
                        decorator.decorate();
                    }
 
 
                });
 
 
            }
        );
 
    </script>
 
</asp:Content>

1 Answer, 1 is accepted

Sort by
0
Danail Vasilev
Telerik team
answered on 11 Jun 2013, 02:31 PM
Hi Tele,

When particular elements are having their class attribute set, that means they are styled with custom CSS. Therefore the expected behavior of the RadFormDecorator when meet such elements is to skip them from decoration.

There are, however, some elements like input type="text" that are decorated despite the setting of their class attribute. The reason for that is due to the specifics in the decorations of these elements. You can, however, skip them form decoration as well by simply setting/adding the "radPreventDecorate" class to them.

Regards,
Danail Vasilev
Telerik
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
Tele
Top achievements
Rank 1
Answers by
Danail Vasilev
Telerik team
Share this question
or