Log In
Home
Support
Demos
Documentation
Blogs
Training
Webinars
[Expand]General Information
[Expand]WinForms Controls
[Collapse]ASP.NET Controls and MVC Extensions
 [Expand]Prerequisites
 [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]Card View
  [Expand]Vertical Grid
  [Expand]Spreadsheet
  [Expand]Rich Text Editor
  [Expand]HTML Editor
  [Expand]Image and Data Browsing
  [Collapse]Docking and Popups
   [Collapse]Docking
     Overview - Docking
    [Collapse]Concepts
      Panel Overview
      Forbidden Zones
      Common Docking Events
      Layout Management
    [Expand]Visual Elements
   [Expand]Hint
   [Expand]Loading Panel
   [Expand]PopupControl
  [Expand]Navigation and Layout Extensions
  [Expand]File Management
  [Expand]Multi-Use Site Extensions
  [Expand]Charts
  [Expand]Pivot Grid
  [Expand]Scheduler
  [Expand]Tree List
  [Expand]Data Editor Extensions
  [Expand]Report Extensions
  [Expand]SpellChecker
 [Expand]Localization
 [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]Document Server
[Expand]Reporting
[Expand]Report Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]CodeRush
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

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.

Note

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

How would you rate this topic?​​​​​​​