Need to persist positions of Raddocklzones in a cookie

2 posts, 0 answers
  1. Priyank
    Priyank avatar
    13 posts
    Member since:
    Nov 2013

    Posted 05 Mar 2014 Link to this post


    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.

  2. Slav
    Slav avatar
    1351 posts

    Posted 10 Mar 2014 Link to this post

    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: 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.


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

  3. DevCraft R3 2016 release webinar banner
Back to Top