[Expand]General Information
[Expand]WinForms Controls
[Collapse]ASP.NET Controls and MVC Extensions
 [Expand]What's Installed
 [Expand]Common Concepts
 [Expand]ASP.NET WebForms Controls
 [Collapse]ASP.NET MVC Extensions
  [Expand]Product Information
  [Expand]Getting Started
  [Expand]Common Concepts
  [Expand]Grid View
  [Expand]Tree List
  [Expand]Card View
  [Expand]Pivot Grid
  [Expand]Rich Text Editor
  [Expand]Site Navigation and Layout
  [Expand]HTML Editor
  [Expand]Vertical Grid
  [Expand]Data Editors Extensions
  [Collapse]Docking and Popups
     Overview - Docking
      Panel Overview
      Forbidden Zones
      Common Docking Events
      Layout Management
    [Expand]Visual Elements
   [Expand]Loading Panel
  [Expand]File Management
  [Expand]Data and Image Navigation
  [Expand]Multi-Use Site Extensions
  [Expand]Query Builder
 [Expand]Redistribution and Deployment
  Get More Help
 [Expand]API Reference
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Office File API
[Expand]Report and Dashboard Server
[Expand]eXpressApp Framework
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation
View this topic on docs.devexpress.com (Learn more)

Layout Management

The DockManager extension allows you to save and restore a previously saved panel layout. This information includes the settings for control visibility, initial panel docking zone, position within the zone, allowed dock state, size, and panel position on the page. You can save the layout information on the server side (e.g., within the Session) or on the client side using cookies.


To obtain full information about all DockPanel and DockZone extensions on the page, DockManager should be rendered after these extensions. Otherwise, DockManager will not affect the panel or zone appearance.

On the Client Side

You can save layout information on the client side within cookies. Enable the DockManagerSettings.SaveStateToCookies option to save the layout within cookies.

On the Server Side

To save layout information on the server side, write a delegate method that implements the required functionality, and assign it to the DockManagerSettings.ClientLayout property. This property provides the ASPxClientLayoutArgs.LayoutMode argument, which indicates whether the layout should be saved or restored. The event fires before a callback (LayoutMode returns ClientLayoutMode.Saving) and on the first page load (LayoutMode returns ClientLayoutMode.Loading). The ASPxClientLayoutArgs.LayoutData argument contains the layout data.

To save layout changes immediately, call the client-side ASPxClientDockManager.PerformCallback method on the ASPxClientDockManager.AfterDock and ASPxClientDockManager.AfterFloat events. Note that as the dock manager sends a callback, it should be placed in a partial view.

You can prohibit end-users from docking and undocking panels by setting the DockManagerSettings.FreezeLayout property to true. In this case, changing a panel's dock state and rearranging panels within a zone by drag-and-drop is not permitted.

Expanded Example

The code example below demonstrates how to automatically store the layout information in the Session between page reloads.

View code (Razor):

Partial View code - "EditLayoutPartial"(Razor):

Expanded See Also

Is this topic helpful?​​​​​​​