Full dynamic docking layout

2 posts, 0 answers
  1. Peter
    Peter avatar
    1 posts
    Member since:
    Apr 2013

    Posted 12 Jul Link to this post



    I have an issue with a full dynamic docking layout. I have an asp:Panel PageContainer and I dynamically add RadDockLayouts to this container.
    To these RadDockLayouts I dynamically add RadDockZones and to these RadDockZones  I dynamically add RadDocks. So far, so good.

    The only thing I want to achieve is that when someone changes the order of a RadDock inside a particular RadDockZone I can somehow save the order of the RadDocks to a database. I am kind of stuck here because, amongst other things,  I do not understand the purpose of the LoadDockLayout and the SaveDockLayout events and when they happen. Do you have any suggestion(s)?


  2. Slav
    Slav avatar
    1351 posts

    Posted 15 Jul Link to this post


    First of all, you can use a single RadDockLayout in order to persist the layout of all RadDock controls on the page. You just need to insert all dynamically created RadDockZones and dock controls in the RadDockLayout.

    As for the LoadDockLayout and SaveDockLayout events, you can check the following help articles for more detailed information: The Lifecycle help article contains a schema that shows when each of the events is fired: http://docs.telerik.com/devtools/aspnet-ajax/controls/dock/structure/dock/lifecycle

    Overall, LoadDockLayout is fired after the initialization of the dock controls, so that if there is any previously saved dock state (it is not the first page load), it is applied to them. SaveDockLayout is fired quite late in the page lifecycle so that any changes to the docks are saved, which will allow for them to be applied the next time a page is loaded via the LoadDockLayout event.

    Finally, there is an explanation of the whole process of creating dock controls dynamically and persisting their state in the following help article: http://docs.telerik.com/devtools/aspnet-ajax/controls/dock/how-to/creating-raddock-dynamically.You can check it in action in the Dynamically Created Docks demo: http://demos.telerik.com/aspnet-ajax/dock/examples/dynamicdocks/defaultcs.aspx. What you need to do additionally is to create the RadDockZones on Page_Init in addition to the dock controls so that the dock state is correctly applied after that.

    Telerik by Progress
    Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
  3. DevCraft R3 2016 release webinar banner
Back to Top