RadControls for ASP.NET AJAX
The SaveDockLayout event occurs when it is appropriate for the application to save the state of all its RadDock controls to a storage medium such as the Session, a cookie, or a database. This event should be used to store the state of RadDock controls in any of the following situations:
The StoreLayoutInViewState property of the RadDockLayout control is False.
You want to save the state of RadDock controls when the user leaves the Web page and restore it when the user returns to the Web page.
The application dynamically creates RadDock controls at runtime.
The SaveDockLayout event handler receives two arguments:
The RadDockLayout control that is responsible for managing the layout of RadDockZone and RadDock controls. This argument is of type object, but can be cast to the RadDockLayout type.
A DockLayoutEventArgs object. This object provides access to layout information in two properties:
Indices is a Dictionary that stores the Index property of all RadDock controls, accessed through the UniqueName property of the RadDock control.
Positions is a Dictionary that stores the DockZoneID property of all RadDock controls, accessed through the UniqueName property of the RadDock control.
If the application has not explicitly set the UniqueName property of the RadDock controls, the Indices and Positions properties of the DockLayoutEventArgs object are indexed by the server-side ID of the RadDock controls.
Typically, a SaveDockLayout event handler uses the RadDockLayout control's GetRegisteredDocksState method, which returns a list of DockState objects that represent the state and position of the each RadDock control managed by the RadDockLayout:
The RadDockLayout control only manages the layout of RadDock and RadDockZone controls that are contained in its Controls collections.