Saving floating dock position when no dockzone in layout

3 posts, 0 answers
  1. CSurieux
    CSurieux avatar
    465 posts
    Member since:
    Jan 2007

    Posted 05 Mar 2009 Link to this post


    I have a floting dock and I want to store ist position in cookie.
    Sample with save and load position seems to be not working in this case ?
    is not concerning this problem.

    Thanks for help.
  2. Petio Petkov
    Petio Petkov avatar
    825 posts

    Posted 06 Mar 2009 Link to this post

    Hi Christian,

    The problem comes from the fact that the Unit object cannot be serialized.  This means that once the object has been serialized and then deserialized, the properties such as Top, Left, Width and Height etc. will loose their values.
    Please note that this has nothing to do with Telerik components but with the .NET Framework and missing serialization.This is a shortcoming of the .Net Framework but it could be overcomed. For example you could use the JavaScriptSerializer class to serialize the state of the docks and write your own implementation of a custom JavaScriptConverter class. This custom class will take care of serialization/deserialization of Unit objects.
    I created a simple example(SaveDockPositionInDB/DefaultVB.aspx ) which illustrates how to save the state for collapsed, docked, floating etc. RadDocks in DB. Please find it attached.

    Petio Petkov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  3. DevCraft R3 2016 release webinar banner
  4. CSurieux
    CSurieux avatar
    465 posts
    Member since:
    Jan 2007

    Posted 06 Mar 2009 Link to this post


    I will investigate this.
    Every days I see how ASP.NET Java (and I should even say Java) is poor: funny to see that we are in 3rd millenium.

    I am not so young and 40 years ago we were in same position: what happened.

    Anyway thanks for your effort.
    I will give a follow up ASAP.

Back to Top