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

2 posts, 0 answers
  1. Tele
    Tele avatar
    5 posts
    Member since:
    Apr 2011

    Posted 07 Jun 2013 Link to this post

    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>
  2. Danail Vasilev
    Admin
    Danail Vasilev avatar
    1494 posts

    Posted 11 Jun 2013 Link to this post

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