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

How to avoid Formdecorator loading at every server side process

1 Answer 100 Views
This is a migrated thread and some comments may be shown as answers.
Top achievements
Rank 1
utchi asked on 06 Apr 2010, 03:18 PM


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.


1 Answer, 1 is accepted

Sort by
Telerik team
answered on 09 Apr 2010, 08:40 AM
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.
Asked by
Top achievements
Rank 1
Answers by
Telerik team
Share this question