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

FormDecorator DecorationZoneID issue

5 Answers 120 Views
FormDecorator
This is a migrated thread and some comments may be shown as answers.
Paweł
Top achievements
Rank 2
Paweł asked on 20 Jan 2009, 04:02 PM
Hello,

I got this RadFormDecorator on my master page with skin set to A and i wanted to use on some page skin B. So what I did is put RadFormDecorator on this page, wrap my content with div named "someDiv" and set DecorationZoneID="someDiv".
But all form controls inside thisd div are still in skin A. Does it some way to force FormDecorator to overwrite skin for that div?

Gr,
Pawel

5 Answers, 1 is accepted

Sort by
0
Georgi Tunev
Telerik team
answered on 21 Jan 2009, 11:53 AM
Hi Paweł,

The reason for this behavior is the same as the one discussed in this forum thread:
http://www.telerik.com/community/forums/aspnet-ajax/form-decorator/issue-with-multiple-decoratedcontrols.aspx

In short, if you want to use multiple RadFormDecorators on a page that would decorate different elements or set different skins, you must use DecorationZones in order to avoid the overriding of the applied styles.


All the best,
Georgi Tunev
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Paweł
Top achievements
Rank 2
answered on 21 Jan 2009, 12:12 PM
So, should i do something like this:

<div id="main_skin">
  Some content

  <div id="some_sub_skin">
    Some more content
    <button>
  </div>

</div>

And then set two RadFormDecorator:
Decorator1 - Skin: nice, DecorationZones: main_skin
Decorator2 - Skin: cool, DecorationZones: some_sub_skin

And in this case I expext <button> to have 'cool' skin, will it be the case?
0
Georgi Tunev
Telerik team
answered on 22 Jan 2009, 03:33 PM
Hi Paweł,

No, the zones cannot be nested - in such scenario the decorator that controls the main zone will override the styles for all child elements of this zone. You need to declare separate zones that are controlled with different RadFormDecorator controls.


All the best,
Georgi Tunev
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Paweł
Top achievements
Rank 2
answered on 22 Jan 2009, 03:45 PM
Hello Georgi,

I did manage to do with global FormDecorator and nested FormDecorator.
The only thing is tha nested shoul apear first on the page, so I did put my global decorator on the bottom of master page and it works just fine!

Paweł
0
Brian Mila
Top achievements
Rank 1
answered on 20 May 2009, 02:43 PM
Pawel,

You are the man!!!  I've been trying to figure out how to do exactly that because I wanted to do a form completely done in one skin, but with the Submit button done in a different skin.  Putting the nested decorator first worked like a charm!  Sweet!!!!!

Thanks guy, you rock!

Brian
Tags
FormDecorator
Asked by
Paweł
Top achievements
Rank 2
Answers by
Georgi Tunev
Telerik team
Paweł
Top achievements
Rank 2
Brian Mila
Top achievements
Rank 1
Share this question
or