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.
    <%@ 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 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 />
        <script type="text/javascript">
                function () {
                    $("<input type='button' id='button2' value='afterready'/>")
                    $("#button1").click(function () {
                        $("<input type='button' id='button3' value='onclick'/>")
                        $("<input type='button' id='button6' disabled='disabled' value='onclick'/>")
                        $("<input type='button' id='button10id' name='voter' value='VOTER' class='bug'/>")
                        var decorator = $find("RadFormDecoratorID");
                        if (decorator) {
  2. Danail Vasilev
    Danail Vasilev avatar
    1502 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.

    Danail Vasilev
    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.
Back to Top