Dynamic loading Raddocks question

2 posts, 0 answers
  1. Sam
    Sam avatar
    103 posts
    Member since:
    Feb 2009

    Posted 29 Apr 2009 Link to this post

    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
            soRadDock.Title = "Dynamic Service Order"
            soRadDock.ID = Guid.NewGuid().ToString()
            so = LoadControl("UserControls/ServiceOrders.ascx")
        End Sub
  2. Petio Petkov
    Petio Petkov avatar
    825 posts

    Posted 01 May 2009 Link to this post

    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.
Back to Top