[Expand]General Information
[Expand]WinForms Controls
[Collapse]ASP.NET Controls and MVC Extensions
 [Expand]Prerequisites
 [Expand]What's Installed
 [Expand]Common Concepts
 [Collapse]ASP.NET WebForms Controls
   Getting Started
  [Collapse]Grid View
   [Expand]Product Information
    Getting Started
   [Expand]Fundamentals
   [Collapse]Concepts
    [Expand]Binding to Data
    [Expand]Data Representation Basics
    [Expand]Focus and Navigation
    [Expand]Data Editing
    [Expand]Data Shaping and Manipulation
    [Expand]Data Formatting
    [Expand]Master-Detail Relationship
     Appearance Customization
     Adaptivity
     Save and Restore Layout
    [Expand]Templates
    [Expand]Export
     Toolbars
    [Expand]ASPxGridLookup
    ASPxGridView Designer
   [Expand]Visual Elements
   [Expand]Examples
   [Expand]Member Tables
   [Expand]ASPxGridView - Animated Images
  [Expand]Tree List
  [Expand]Card View
  [Expand]Reporting
  [Expand]Chart Control
  [Expand]Pivot Grid
  [Expand]Spreadsheet
  [Expand]Rich Text Editor
  [Expand]Scheduler
  [Expand]Site Navigation and Layout
  [Expand]HTML Editor
  [Expand]Gauges
  [Expand]Vertical Grid
  [Expand]Data Editors
  [Expand]Docking and Popups
  [Expand]File Management
  [Expand]Data and Image Navigation
  [Expand]Multi-Use Site Controls
  [Expand]Spell Checker
  [Expand]Query Builder
 [Expand]ASP.NET MVC Extensions
 [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]Office File API
[Expand]Reporting
[Expand]Report and Dashboard Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]eXpress Persistent Objects
[Expand]CodeRush
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation
View this topic on docs.devexpress.com (Learn more)

Save and Restore Layout

ASPxGridView allows you to save information on its layout to a database and then restore it. This information can include a column's visible position, column and control width, filter, sorting, grouping and paging information. To specify what information on the ASPxGridView layout is saved, use options provided by the ASPxGridView.SettingsCookies property.

Expanded Automatic Layout Saving/Restoring

The ASPxGridView ASPxGridBase.ClientLayout event enables you to save the grid's layout each time it is being changed and restore it on the first page load. This event provides the ASPxClientLayoutArgs.LayoutMode property that indicates whether the grid's layout should be saved or restored.

This example shows how to save or restore the ASPxGridView layout to or from a data store.

Expanded Manual Layout Saving/Restoring

ASPxGridView provides two methods that enable you to manually save and restore its layout. These are:

This example shows how to manually save and restore the previously saved layout. When the Save Layout or Load Layout button is clicked, the grid's ASPxClientGridView.PerformCallback client method is used to send a callback to the server. This generates the server-side ASPxGridView.CustomCallback event, which is handled to save or restore the grid's layout.

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