Hi,
I have coded a page with a RadTabStrip + RadMultiPages embedded in a RadDockLayout (see code sample below), on which I can dynamically add new tabs. Each tab embeds a RadDockZone and when I press my AddDock button it creates a new dock in the currently selected RadDockZone.
Everything works like a charm here. Although I'm not 100% happy with this.
I can have up to 12 tabs opened at the same time and each of those tabs can host up to 60 docks. ie the Page itself could host up to 624 docks, which is quite heavy I must say.
Therefore I'm trying to get everything done on the client side and avoid pointless postbacks when I can. I disabled the AutoPostBack properties from my docks hence, only the client event OnClientDockPositionChanged is trigger (no postback on DockPositionChanged). This avoids to rebuild the whole bunch of possibly 624 docks every time I move one.
The issue here is obviously if I refresh the page I lose all of my dock states.
My question is as follow: Is there a way to save the DockLayout before the page is being reloaded while AutoPostBack on docks is set to false ? Something like RadDockLayout.RefreshDockLayout() from code behind would be awesome :)
Should I send a big chunk of JSON data (the dockstates) to my server prior to reloading the page ? If so, what would be the best way to do such thing ?
Thanks,
Chris
I have coded a page with a RadTabStrip + RadMultiPages embedded in a RadDockLayout (see code sample below), on which I can dynamically add new tabs. Each tab embeds a RadDockZone and when I press my AddDock button it creates a new dock in the currently selected RadDockZone.
<
asp:UpdatePanel
ID
=
"UPLineManager"
runat
=
"server"
UpdateMode
=
"Conditional"
>
<
ContentTemplate
>
<
telerik:RadButton
ID
=
"rbtAddLine"
runat
=
"server"
OnClick
=
"rbtAddLine_Clicked"
Text
=
"New"
>
</
telerik:RadButton
>
<
telerik:RadButton
ID
=
"ButtonAddStop"
runat
=
"server"
OnClick
=
"ButtonAddStop_Click"
Text
=
"Add Stop"
/>
<
div
>
<
telerik:RadDockLayout
ID
=
"RdlLineBuilder"
runat
=
"server"
OnSaveDockLayout
=
"RdlLineBuilder_SaveDockLayout"
OnLoadDockLayout
=
"RdlLineBuilder_LoadDockLayout"
>
<
telerik:RadTabStrip
ID
=
"rtsLines"
runat
=
"server"
CssClass
=
"rtsLines"
MultiPageID
=
"mpLines"
OnTabCreated
=
"rtsLines_TabCreated"
>
</
telerik:RadTabStrip
>
<
telerik:RadMultiPage
ID
=
"mpLines"
runat
=
"server"
CssClass
=
"multiPageViewContent"
Height
=
"400"
OnPageViewCreated
=
"mpLines_PageViewCreated"
>
</
telerik:RadMultiPage
>
<
telerik:RadAjaxLoadingPanel
ID
=
"ralpLines"
runat
=
"server"
>
</
telerik:RadAjaxLoadingPanel
>
</
telerik:RadDockLayout
>
</
div
>
</
ContentTemplate
>
</
asp:UpdatePanel
>
Everything works like a charm here. Although I'm not 100% happy with this.
I can have up to 12 tabs opened at the same time and each of those tabs can host up to 60 docks. ie the Page itself could host up to 624 docks, which is quite heavy I must say.
Therefore I'm trying to get everything done on the client side and avoid pointless postbacks when I can. I disabled the AutoPostBack properties from my docks hence, only the client event OnClientDockPositionChanged is trigger (no postback on DockPositionChanged). This avoids to rebuild the whole bunch of possibly 624 docks every time I move one.
The issue here is obviously if I refresh the page I lose all of my dock states.
My question is as follow: Is there a way to save the DockLayout before the page is being reloaded while AutoPostBack on docks is set to false ? Something like RadDockLayout.RefreshDockLayout() from code behind would be awesome :)
Should I send a big chunk of JSON data (the dockstates) to my server prior to reloading the page ? If so, what would be the best way to do such thing ?
Thanks,
Chris