How to avoid Formdecorator loading at every server side process

2 posts, 0 answers
  1. utchi
    utchi avatar
    36 posts
    Member since:
    May 2009

    Posted 06 Apr 2010 Link to this post


    I m having some three asp:button in my page and i m using formdecorator to initialize skins to that buttons.

    But formdecorator loading at all server side events. I want to set it once and i dont want to load it again & again.

    And it take some 6 secs to set skin to that buttons after server side events.

    Below is the formdecorator i have used,


    <telerik:RadFormDecorator ID="FormDecorator1" runat="server" DecoratedControls="Buttons" >



    and below is the button in Hierarchygrid,



                                <input type="Button" runat="server" value="MoveDown" onclick="moveRowDown()">  
                                <input type="Button" runat="server" value="MoveUp"  onclick="moveRowUp()">  

    Please find the screenshots to get clear idea about the problem.
    Give suggestions to solve it.


  2. Lini
    Lini avatar
    2144 posts

    Posted 09 Apr 2010 Link to this post

    Hello Maha,

    I assume that  you are updating your grid with Ajax requests. The form decorator works on the client (browser) after the page is initially loaded. Unfortunately, after each Ajax request, the buttons are recreated on the server so they lose the styles applied by the decorator. This is why we attach a handler to the pageLoaded event that is fired after each ajax request. In this handler we go through all UpdatePanels that were updated on the server and decorate their controls again.

    The slow performance in your scenario can be caused by a number of reasons, but the most probable is that you are updating a large part of the page, so the browser takes some time to recreate all controls. The form decorator must wait for this re-initialization process to finish and then cycle through all updated controls and search for buttons to decorate.

    What you can do to minimize this is to have the form decorator work with a smaller zone and not the whole page -
    This way you can minimize the time it takes to cycle through controls after Ajax requests.

    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  3. DevCraft R3 2016 release webinar banner
Back to Top