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

Need to persist positions of Raddocklzones in a cookie

1 Answer 12 Views
Dock
This is a migrated thread and some comments may be shown as answers.
Priyank
Top achievements
Rank 1
Priyank asked on 05 Mar 2014, 03:55 PM
Hi,

My requirement is like this.

I have a page on which I have a RadDockLayout.

I have placed a user control on this page which contains a datalist.

Datalist dynamically generates Raddockzones.

I need to provide the user with an option to save positions of Raddockzones as well as the states of the Raddocks they contain in a cookie.

Is there a way to accomplish this?

Any help would be appreciated.

Thanks,
Priyank

1 Answer, 1 is accepted

Sort by
0
Slav
Telerik team
answered on 10 Mar 2014, 12:03 PM
Hello Priyank,

The RadDockLayout control is used for storing the state of the RadDocks that are placed within. When the docks are created dynamically you can use this state to recreate them after a postback, as shown in the following online demo: http://demos.telerik.com/aspnet-ajax/dock/examples/dynamicdocks/defaultcs.aspx. The example uses the Session as a storage for the dock state, however this can easily be changed. Note that cookies have a 4MB limit and if you reach it there will be problems with the dock state, nevertheless this can happen only if there are a lot of docks on the page.

The RadDockZones, however, are not stored in the dock state, because by default their position in the page is static. If you create them dynamically, you need store their settings separately. Note that when a postback is initiated, you should recreate the dock zones with the same ID and insert them on the sample place on the page afterwards, otherwise the state of the docks will not be loaded correctly because of changes in the layout of the page.

Regards,
Slav
Telerik

DevCraft Q1'14 is here! Watch the online conference to see how this release solves your top-5 .NET challenges. Watch on demand now.

Tags
Dock
Asked by
Priyank
Top achievements
Rank 1
Answers by
Slav
Telerik team
Share this question
or