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

LoadState

4 Answers 132 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Preetam Ray
Top achievements
Rank 1
Preetam Ray asked on 31 Jul 2008, 10:36 AM
How to use LoadDockLayout in place of LoadState()?

4 Answers, 1 is accepted

Sort by
0
Preetam Ray
Top achievements
Rank 1
answered on 31 Jul 2008, 02:42 PM
To add more details i was using LoadDockLayout in the following line of code

((FISMaster)(

this.Page.Master)).DockManager.LoadState(state);

 in place of loadState().
0
Sophy
Telerik team
answered on 31 Jul 2008, 04:02 PM
Hello Preetam,

I suggest you review the following online demos - Load/Save Layout, Dynamically Created Docks and the help article Dynamically Creating RadDock Controls which describes how you can dynamically create docks and save their states in a storage medium such as a cookie, session or database. The RadDockLayout's server-side events SaveDockLayout and LoadDockLayout allow you to easily achieve the saving/loading state functionality with RadDock for ASP.NET AJAX. These events receive as an argument a DockLayoutEventArgs object which has two properties - DockZoneID and Index.The Index property is the position of the RadDock control in the docking zone. 
If you need further assistance, do contact us again providing more details about your scenario and the difficulties you experience.

All the best,
Sophy
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Preetam Ray
Top achievements
Rank 1
answered on 01 Aug 2008, 10:12 AM
Sophy,

Thankx for your reply. But I have a doubt like say  LoadState was a method and LoadDockLayout is an event so do I need to  explicitly write code to raise this event?
0
Sophy
Telerik team
answered on 01 Aug 2008, 12:59 PM
Hello Preetam,

You do not need to raise any of the SaveDockLayout  and the LoadDockLayout events. The SaveDockLayout and the LoadDockLayout events will be automatically raised when the application should accordingly save the state of all RadDock controls on the page and restore the layout of RadDock controls that was saved in a previously-called SaveDockLayout event handler. You can take a look at the RadDock LifeCycle for reference.
In order to assure the proper saving and loading of the dock's state you need to add all the docks inside a RadDockLayout and wire up handlers to the SaveDockLayout and LoadDockLayout events of the layout. In the corresponding handlers you can add the code you want to be executed at saving/loading the dock's state.
Let us know if you have any other questions.

Kind regards,
Sophy
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Ajax
Asked by
Preetam Ray
Top achievements
Rank 1
Answers by
Preetam Ray
Top achievements
Rank 1
Sophy
Telerik team
Share this question
or