FormDecorator DecorationZoneID issue

6 posts, 0 answers
  1. Paweł
    Paweł avatar
    16 posts
    Member since:
    Jan 2009

    Posted 20 Jan 2009 Link to this post

    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
  2. Georgi Tunev
    Admin
    Georgi Tunev avatar
    7207 posts

    Posted 21 Jan 2009 Link to this post

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Paweł
    Paweł avatar
    16 posts
    Member since:
    Jan 2009

    Posted 21 Jan 2009 Link to this post

    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?
  5. Georgi Tunev
    Admin
    Georgi Tunev avatar
    7207 posts

    Posted 22 Jan 2009 Link to this post

    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.
  6. Paweł
    Paweł avatar
    16 posts
    Member since:
    Jan 2009

    Posted 22 Jan 2009 Link to this post

    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ł
  7. Brian Mila
    Brian Mila avatar
    6 posts
    Member since:
    Apr 2009

    Posted 20 May 2009 Link to this post

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