Skip to content

Save and restore a grid layout between application sessions.

License

Notifications You must be signed in to change notification settings

DevExpress-Examples/blazor-DxGrid-save-restore-layout

Repository files navigation

Grid for Blazor - Save and load layout information

The DevExpress Blazor Grid allows you to save layout information between application sessions. This example demonstrates two different approaches to how to save and restore a grid layout:

  • Handle the Grid's LayoutAutoSaving and LayoutAutoLoading events to automatically save and restore the grid layout. On the Auto.razor page, the Grid saves the current layout information to the local storage once the layout changes. When the page reloads, the Grid restores the saved layout.

    The Auto.razor page

  • Call the Grid's SaveLayout and LoadLayout methods to save and restore the grid layout on demand. On the API.razor page, the Grid saves the current layout information after a user clicks the Save current layout button. A List Box to the right of the Grid displays all saved layout items. When a user selects an item in the List Box and clicks the Load layout button, the Grid restores the selected layout.

    The API.razor page

Files to Review

Documentation

Does this example address your development requirements/objectives?

(you will be redirected to DevExpress.com to submit your response)

About

Save and restore a grid layout between application sessions.

Topics

Resources

License

Stars

Watchers

Forks