New Behavior for RadFormDecorator in 2009.2?

4 posts, 0 answers
  1. Joel Kraft
    Joel Kraft avatar
    87 posts
    Member since:
    Jan 2004

    Posted 07 Jul 2009 Link to this post

    Did the behavior of the RadFormDecorator change in 2009.2 regarding the portion of the DOM that is decorated by default?

    In 2009.1, the decoration would only apply to controls that were lower in the DOM tree than the form decorator control itself.  For example:
    <div>
    <asp:Textbox>Not Decorated</asp:TextBox>
    <div>
    <TELERIK:RadFormDecorator ControlsToDecorate="TextBox" />
    <asp:Textbox>Is Decorated</asp:Textbox>
    </div>
    </div>

    This meant if you were using master pages or nested controls, that the decorating would stay confined to your control.  In 2009.2, it appears that the entire DOM is decorated by default.  Is this intended?  It is not documented in the change notes.

    Joel
  2. Georgi Tunev
    Admin
    Georgi Tunev avatar
    7207 posts

    Posted 09 Jul 2009 Link to this post

    Hello Joel,

    The decorating logic of the RadFormDecorator hasn't been changed since the first release. Basically, it doesn't matter where the form decorator is - it will either decorate all controls on the page or will decorate only the ones in the decoration zone. To illustrate this, I attached a small sample project with the Q1 version and your code - as you can see from the attached screenshot both textboxes are styled. In scenarios like yours where you need to decorate only portions of a page, you should use DecorationZoneID. We always recommend to put the RadFormDecorator first on the page (after the script manager) only to ensure that it will be loaded before the other ASP.NET AJAX controls.



    Regards,
    Georgi Tunev
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Joel Kraft
    Joel Kraft avatar
    87 posts
    Member since:
    Jan 2004

    Posted 09 Jul 2009 Link to this post

    Actually I made a mistake trying to be efficient in my post and wasn't careful and cut out too much stuff!!

    My second thought was that this had to do with master pages because we put the formdecorator in a content pages that need it, but there are a couple of textboxes in the master page that we do not want decorated.  Upon further investigation that doesn't appear to be the issue, either.

    There is a new behavior, though, and as far as I can tell it is that 2009.1 would not style elements that had a CSS class defined.  In 2009.2, every element gets styled no matter what.  Is there no way to disable this (or override, which was what we used classes for) for a single control???

    Because our zone is actually defined in a master page, this gets a little difficult.  I'm reluctant to put the control in the masterpage because our site has almost 3000 pages and less than 50 of them actually use decoration.  How much overhead is introduced if there are no controls to decorate?

    Joel
  5. Georgi Tunev
    Admin
    Georgi Tunev avatar
    7207 posts

    Posted 10 Jul 2009 Link to this post

    Hello again Joel,

    This functionality hasn't been changed as well - as you can see from the attached screenshot, the decorator will not style elements that has a Class property assigned. If you have an example where RadFormDecorator Q2 2009 does that, please open a support ticket and send it to us so we can investigate.
    More information on RadFormDecorator's changes is available in this blog post:
    http://blogs.telerik.com/tervelpeykov/posts/09-06-24/radformdecorator_q2_2009_-_more_decoration_options_faster_rendering.aspx

    Kind regards,
    Georgi Tunev
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
Back to Top