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

Traffic improvements when CallBack processed.

4 Answers 43 Views
Dock
This is a migrated thread and some comments may be shown as answers.
Oliver Popov
Top achievements
Rank 1
Oliver Popov asked on 01 Nov 2008, 09:17 PM

Hello!

There is a kind of problem.
I have the same two updatepanels with two radzones.
When I make any (ANY) ajax callback via any updatePanel, all the request params are passed to the server.
And every RadDock passes similar info:

'ctl00_ContentPlaceHolder1_1_RadDock_ClientState' 
'  "{\"Top\":0,\"Left\":0,\"DockZoneID\":\"ctl00_ContentPlaceHolder1_zoneSearch\",\"Collapsed\":false,\"Pinned\":false,\"Resizable\":false,\"Closed\":false,\"Width\":\"300px\",\"Height\":null,\"ExpandedHeight\":0,\"Index\":0}"

it's up to 250 symbols, so if I have 200 docks - it's more than 50000(!) symbols.
so for rapid ajax requests it's not so good and I don't need any of this info (managing positions "manually").
is there a possibility to reduce this exceed traffic (switch-off those parameters passing)?
 I added 

 

StoreLayoutInViewState

="false" and EnableViewState="false"

but nothing changed.

Thank you and the best regards!

 

4 Answers, 1 is accepted

Sort by
0
Obi-Wan Kenobi
Top achievements
Rank 1
answered on 03 Nov 2008, 10:04 AM
This information is used to preserve the RadDock state on the server. If you remove it you will not be able to maintain the state correctly.
On my opinion 200 RadDocks are not a real scenario for one screen:). From another point of view the state size for 200 RadDocks is ~96KB(100000b) which is OK.
0
Oliver Popov
Top achievements
Rank 1
answered on 03 Nov 2008, 11:25 AM
Thanks for the answer.

And I assure I understand asp.net pages lifetime.

But I absolutely don't need this info on call/postback (I manage all the stuff "by hands") - I need RadDocks javascript functionaliry only, and changing their index I do with my own Ajax callback with my defined simplified parameters.

Plus, exceed 100kb (at least) at every tiny callback is not perfect.

I am just asking if there is any possibility to turn-off mentioned parameters passing on call/postback?

Thank you and the best regards.
0
Obi-Wan Kenobi
Top achievements
Rank 1
answered on 05 Nov 2008, 03:25 PM
You can delete all state fields which contains this state information  via javascript just before the postaback, e.g.
<html xmlns="http://www.w3.org/1999/xhtml" > 
<head runat="server">  
    <title>Untitled Page</title> 
    <script type="text/javascript">  
    function DeleteInputFields()  
    {  
        var zonesCount = Telerik.Web.UI.RadDockZonesGlobalArray.length;  
        for(var i=0;i<zonesCount;i++)  
        {  
            var currentZone = Telerik.Web.UI.RadDockZonesGlobalArray[i];  
            var zoneStateFieldID = currentZone.get_clientStateFieldID();  
            $get(zoneStateFieldID).value='';  
            var docksCount = currentZone.get_docks().length;  
             
            for(var j=0;i<docksCount;i++)  
            {      
                var currentDock = currentZone.get_docks()[j];  
                var dockStateFieldID = currentDock.get_clientStateFieldID();  
                $get(dockStateFieldID).value='';  
            }  
        }  
        alert("stateInfo is removed");  
    }  
    </script> 
      
</head> 
<body> 
    <form id="form1" runat="server">  
    <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager> 
    <div> 
    <telerik:RadDockLayout ID="RadDockLayout1" runat="server">  
        <telerik:RadDockZone ID="RadDockZone1" runat="server">  
            <telerik:RadDock ID="RadDock1" Text="RadDock1" runat="server">  
            </telerik:RadDock> 
        </telerik:RadDockZone> 
        <telerik:RadDockZone ID="RadDockZone2" runat="server">  
        </telerik:RadDockZone> 
    </telerik:RadDockLayout> 
    <asp:Button ID="Button1" runat="server" Text="Button1"/>  
    <input type="button" value="ClearInputFields" onclick="DeleteInputFields()" /> 
      
      
    </div> 
    </form> 
</body> 
</html> 

Hope this helps.
0
Oliver Popov
Top achievements
Rank 1
answered on 10 Nov 2008, 01:54 PM
Yes. This will mostly solve the problem.

Thank you.
Tags
Dock
Asked by
Oliver Popov
Top achievements
Rank 1
Answers by
Obi-Wan Kenobi
Top achievements
Rank 1
Oliver Popov
Top achievements
Rank 1
Share this question
or