We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Problem saving dock state

Hi I have a application that have docked components(dockedtofill) and it is dynamic how many components are docked. User configures a group of items to show in the application and the application creates a listview for each group the user creates and displays the listview on the screen. Then the users docks the listview where he likes it to be and saves the layout. Sometimes the layout opens up just like the user saved it but it happens that the layout opens up corrupted. The listviews can have icelandic characters in their title - could that be the problem - does the savestate depends on the name of each listview? - any suggestions? thanks Haukur

8 Replies

AD Administrator Syncfusion Team November 13, 2003 05:10 PM UTC

Hi Haukur, Please refer to the sample attached. Here I have 3 buttons, each corresponding to the one group, and a Save and Load buttons. When a group button is pressed the appropriate ListView is created and docked as specified above. You could move the docking window around and create a desired layout. Press the Save button to save this layout. Now click another group button to create a new ListView. If you wish to revert back to the old layout, press the load button which in turn loads the previous layout. Please let me know if this meets your requirements. Thanks for choosing Syncfusion products. Regards, Guru Patwal Syncfusion, Inc.


Haukur Örn Harðarson November 13, 2003 07:09 PM UTC

Hi Thanks for the example - The code was similar to what I have done - I set up a test application that I attach to this message. It has 10 listviews created in code. I have tested it and tried to dock it all possible ways and in some cases when I select save and then load the setup corrupts and loaded layout is not like the layout I had saved right before. YOu should be able to reproduce the problem I have with this example - It does work well most of the time but I tried 20 different gui setup and approx. 3 of them failed. Any help on what I am doing wrong will be appricieted thanks Haukur


AD Administrator Syncfusion Team November 14, 2003 01:18 PM UTC

Hi Haukur, Thanks for the example. This code needs a few modifications. Firstly, the following code is not necessary if you are programmatically creating the docking layout : this.dockMan.DockLayoutStream = ((System.IO.MemoryStream)(resources.GetObject("dockMan.DockLayoutStream"))); Secondly, the ListViews created have not been added to the Form's Controls list. I have modified the your application accordingly and re-attached it here. When I tested the application with these changes, the LoadDockState and SaveDockState methods worked fine. Please try this on your system and let me know how it goes. Also, please let me know the version of Essential Tools that you are using. Thanks for your cooperation. Regards, Guru Patwal Syncfusion, Inc.


AD Administrator Syncfusion Team November 14, 2003 01:20 PM UTC

Hi Haukur, This is your modified application. Thanks for your cooperation. Regards, Guru Patwal Syncfusion, Inc.


Haukur Örn Harðarson November 15, 2003 09:16 AM UTC

Hi Thank you for this. I tried it and seems to work fine. But when I set DockToFill=true then the layout corrupts when saving and loading again. My application uses DockToFill=true but if this is the problem I can change the layout and stop using that. Im using version 1.6.1.8. Will there be some improvements regarding saving dock state in version 2.0? - I noticed that in the example you sent me you have dockingManager.HostControl=this - this property is not in my version - it is dockingManager.HostForm - probably because of a newer version. thanks, Haukur


AD Administrator Syncfusion Team November 15, 2003 05:52 PM UTC

Hi Haukur, The 2.0 Docking Windows Architecture is very stable (compared to previous versions), as it contains a lot of fixes and additional features like ContainerControl support. Please open an incident in DirectTrac in this regard and we will send you the download instructions for our latest release. Thanks for choosing Syncfusion products. Regards, Guru Patwal Syncfusion, Inc.


JO Joe July 26, 2007 06:23 PM UTC

Hi Guru,

I'm unable to download your "modified_dock_listview_test.zip" demo, which i was hoping would help me resolve my serialisation issues.

Is it possible you could re-post this?

Many Thanks,
Joe

>Hi Haukur,
>
>This is your modified application. Thanks for your cooperation.
>
>Regards,
>Guru Patwal
>Syncfusion, Inc.
>


JO Joe July 26, 2007 06:24 PM UTC

Hi Guru,

I'm unable to download your "modified_dock_listview_test.zip" demo, which i was hoping would help me resolve my serialisation issues.

Is it possible you could re-post this?

Many Thanks,
Joe

>Hi Haukur,
>
>This is your modified application. Thanks for your cooperation.
>
>Regards,
>Guru Patwal
>Syncfusion, Inc.
>

Loader.
Live Chat Icon For mobile
Up arrow icon