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

Dynamic loading Raddocks question

1 Answer 42 Views
Dock
This is a migrated thread and some comments may be shown as answers.
Sam
Top achievements
Rank 1
Sam asked on 29 Apr 2009, 03:02 PM
I am loading a radodock from a database on Init, it all works fine until I save the layout, we are using cookies as the save basis for the layout not the database. It will remember the layout in the dock zone am loading it into but if I drag it into another zone it doesnt save. Im not surprised by it but how do I get it to save properly?

Here is my load code.

Protected Sub Page_Init(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Init
        Dim so As New System.Web.UI.Control
        Dim soRadDock As New RadDock
        RadDockZone3.Controls.Clear()
        soRadDock.Title = "Dynamic Service Order"
        soRadDock.ID = Guid.NewGuid().ToString()
        so = LoadControl("UserControls/ServiceOrders.ascx")
        soRadDock.ContentContainer.Controls.Add(so)
        RadDockZone3.Controls.Add(soRadDock)
    End Sub

1 Answer, 1 is accepted

Sort by
0
Petio Petkov
Telerik team
answered on 01 May 2009, 02:53 PM
Hello Sam,

If you want to preserve the RadDock state after a Postback you should wrap all RadDockZones and RadDocks with RadDockLayout.
Here are several examples which illustrates how to save/load RadDock state
    1) SaveState in cookies
    2) Dynamically created RadDocks and save their state in session

You should load the state in RadDockLayout.LoadDockLayout event handler and save it in RadDockLayout.SaveDockLayout event handler.

Kind regards,
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.
Tags
Dock
Asked by
Sam
Top achievements
Rank 1
Answers by
Petio Petkov
Telerik team
Share this question
or