RadDockLayout
Workflow: 1). OnInit - ensure that the framework will call TrackViewState, LoadViewState and SaveViewState. We expect that all child docks will be created here. 2). TrackViewState - raise LoadDockLayout event in order to let the developer to supply the initial parents of the registered docks, because the docks could be created with different parents than needed. 2a). LoadViewState - loads and applies the dock parents from the ViewState in order to persist the dock positions between the page postbacks. 3). LoadPostData - returns true to ensure that RaisePostDataChangedEvent() 3a). Dock_DockZoneChanged - this event is raised by each dock in its LoadPostData method. We handle this event and store the pair UniqueName/NewDockZoneID in the _clientPositions Dictionary. This Dictionary will be used in #4. 4). RaisePostDataChangedEvent - sets the parents of the registered docks according their positions, set on the client. These positions are stored in the _clientPositions Dictionary. 5). OnLoad, other events, such as Click, Command, etc. If you create a dock here it will be rendered on the page, but if it is not recreated in the next OnInit, it will not persist its position, set on the client! 6). SaveViewState - stores the dock parents in the ViewState in order to persist their positions between the page postbacks. 7). Page_SaveStateComplete - raises the SaveDockLayout event to let the developer to save the state in a database or other storage medium. Note: The dock parents will be stored in the ViewState if StoreLayoutInViewState is set to true (default). Otherwise the developer should take care of the dock positions when the page is posted back.
Definition
Namespace:Telerik.Web.UI
Assembly:Telerik.Web.UI.dll
Syntax:
[TelerikToolboxCategory("Container")]
[ToolboxBitmap(typeof(RadDockLayout), "Toolbox.Icons.Dock.png")]
[EmbeddedSkin("Dock")]
[EmbeddedSkin("Dock", "Default")]
[RequiredCss("Telerik.Web.UI.Skins.Common.fonticons.css", RenderMode.Lightweight, typeof(RadDockLayout))]
public class RadDockLayout : Control, IComponent, IDisposable, IParserAccessor, IUrlResolutionService, IDataBindingsAccessor, IControlBuilderAccessor, IControlDesignerAccessor, IExpressionsAccessor, IDockLayout, ISkinnableControl, IControl
Inheritance: objectControlRadDockLayout
Implements:
Inherited Members
Constructors
public RadDockLayout()
Properties
Gets or sets the value, indicating whether to render the skin CSS files during Ajax requests.
public virtual bool EnableAjaxSkinRendering { get; set; }
If EnableAjaxSkinRendering is set to false you will have to register the needed control base CSS file by hand when adding/showing the control with Ajax.
Gets or sets the value, indicating whether to render the link to the embedded base stylesheet of the control or not.
public virtual bool EnableEmbeddedBaseStylesheet { get; set; }
Implements:
If EnableEmbeddedBaseStylesheet is set to false you will have to register the needed control base CSS file by hand.
Gets or sets the value, indicating whether to render links to the embedded skins or not.
public bool EnableEmbeddedSkins { get; set; }
Implements:
If EnableEmbeddedSkins is set to false you will have to register the needed CSS files by hand.
If the Skin property is set, RadDockLayout will set the Skin and EnableEmbeddedSkins properties of each child RadDock and RadDockZone, unless their Skin property is not explicitly set.
Specifies wheter the built-in state storing should be enabled.
public bool EnableLayoutPersistence { get; set; }
Gets or sets the type of the data repository to be used for storing the state.
public DockLayoutPersistenceRepository LayoutPersistenceRepositoryType { get; set; }
The corresponding StorageProvider will be used for the state storing functionality.
Gets or sets the key identifier of the stored RadDocks' states.
public string LayoutRepositoryID { get; set; }
The corresponding StorageProvider will be used for the state storing functionality.
Returns all registered docks with this RadDockLayout control.
public ReadOnlyCollection<RadDock> RegisteredDocks { get; }
Returns a read only collection containing all registered docks.
Returns all registered zones with this RadDockLayout control.
public ReadOnlyCollection<RadDockZone> RegisteredZones { get; }
Returns a read only collection containing all registered zones.
Specifies the rendering mode of the control. Setting the mode to Lightweight will yield HTML 5/CSS 3 html and css.
[ClientControlProperty]
public virtual RenderMode RenderingMode { get; set; }
Lightweight rendering mode might change the outlook of the component in some older browsers that don't support CSS3/HTML5.
Gets or sets the skin name for the child controls' user interface.
[TypeConverter("Telerik.Web.Design.SkinTypeConverter, Telerik.Web.Design, Version=2026.3.812.462, Culture=neutral, PublicKeyToken=121fae78165ba3d4")]
public string Skin { get; set; }
A string containing the skin name for the control user interface. The default is string.Empty.
Implements:
If this property is set, RadDockLayout will set the Skin and EnableEmbeddedSkins properties of each child RadDock and RadDockZone, unless their Skin property is not explicitly set.
Gets or sets the StateStorageProvider instance that will be used for the built-in state storing.
[Browsable(false)]
public IStateStorageProvider StorageProvider { get; set; }
By default RadDockLayout will store the positions of its inner docks in the ViewState. If you want to store the positions in other storage medium such as a database, or the Session, set this property to false. Setting this property to false will also minimize the ViewState usage.
public bool StoreLayoutInViewState { get; set; }
Methods
Cycles through all registered docks and retrieves their state, depending on the omitClosedDocks parameter and the value of the Closed property of each RadDock control. The List returned by this method could be used to recreate the docks when the user visits the page again.
Raises the LoadDockLayout event.
protected virtual void OnLoadDockLayout(DockLayoutEventArgs e)
A DockLayoutEventArgs that contains the event data.
Raises the SaveDockLayout event.
protected virtual void OnSaveDockLayout(DockLayoutEventArgs e)
A DockLayoutEventArgs that contains the event data.
public RenderMode PreferredRenderMode(RenderModeBrowserAdaptor browser)
Implements:
Reorders the docks in the control tree, according the supplied parameters.
public void SetRegisteredDockParents(Dictionary<string, string> parents, Dictionary<string, int> indices)
A Dictionary, containing UniqueName/DockZoneID pairs.
indicesDictionary<string, int>A Dictionary, containing UniqueName/Index pairs.
This method will check for uniqueness of the UniqueNames of the registered docks. If there are two docks with equal unique names an exception will be thrown.
Events
RadDockLayout will raise the LoadDockLayout event in order to retrieve the parents which will be automatically applied on the registered docks. The client positions will be applied in a later stage of the lifecycle.
public event DockLayoutEventHandler LoadDockLayout
RadDockLayout will raise this event to let the developer to save the parents of the registered docks in a database or other storage medium. These parents can be later supplied to the LoadDockLayout event.
public event DockLayoutEventHandler SaveDockLayout