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

New Behavior for RadFormDecorator in 2009.2?

3 Answers 173 Views
FormDecorator
This is a migrated thread and some comments may be shown as answers.
Joel Kraft
Top achievements
Rank 2
Joel Kraft asked on 07 Jul 2009, 12:48 PM
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

3 Answers, 1 is accepted

Sort by
0
Georgi Tunev
Telerik team
answered on 09 Jul 2009, 10:51 AM
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.
0
Joel Kraft
Top achievements
Rank 2
answered on 09 Jul 2009, 01:15 PM
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
0
Georgi Tunev
Telerik team
answered on 10 Jul 2009, 10:12 AM
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.
Tags
FormDecorator
Asked by
Joel Kraft
Top achievements
Rank 2
Answers by
Georgi Tunev
Telerik team
Joel Kraft
Top achievements
Rank 2
Share this question
or