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

Saving floating dock position when no dockzone in layout

2 Answers 82 Views
Dock
This is a migrated thread and some comments may be shown as answers.
CSurieux
Top achievements
Rank 2
CSurieux asked on 05 Mar 2009, 03:24 PM
Hello,

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 ?
And 
http://www.telerik.com/community/forums/aspnet-ajax/docking/portalsite-demo-database-c-and-vb-net.aspx
is not concerning this problem.

Thanks for help.
CS

2 Answers, 1 is accepted

Sort by
0
Petio Petkov
Telerik team
answered on 06 Mar 2009, 01:09 PM
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.


Greetings,
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.
0
CSurieux
Top achievements
Rank 2
answered on 06 Mar 2009, 01:24 PM
Thanks,

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.

CS
Tags
Dock
Asked by
CSurieux
Top achievements
Rank 2
Answers by
Petio Petkov
Telerik team
CSurieux
Top achievements
Rank 2
Share this question
or