Save and Restore Grid Layout
- 2 minutes to read
The Data Grid and other controls allow you to save their layout information to data stores (XML file, stream and system registry) and then restore it. The saved layout includes the visibility, position, and size of visual elements, their sort, group, summary, and filter settings. You can customize which properties need to be saved/restored and perform actions on layout loading.
The Persistence Behavior and Workspace Manager components allow you to save/restore the layout of all DevExpress controls within a form along with that form’s bounds and state.
When restoring a layout during a form load (for instance, in your Form.Load event handler), you may need to call the GridControl.ForceInitialize method prior to the layout restoration. See this method to learn more.
Set the column and band names to unique values to avoid issues when saving/restoring a View’s layout.
- Saving and Restoring Layouts to a File, Stream and System Registry
- Layout Options (XtraGrid, XtraPivotGrid)
- Upgrading Layout
Grid Control Specifics
- How to: Save a Grid’s Layout Between Application Runs
- How to: Save a View’s Layout to and Restore it from a Stream
- How to: Save a View’s Layout to and Restore it from the Registry