Skip to main content
A newer version of this page is available. .

How to: Save a View's Layout to and Restore it from the Registry

The following example saves the layout of the GridControl.MainView to the system registry and then restores it. The full path for the layout in the registry will be: HKEY_CURRENT_USER\DevExpress\XtraGrid\Layouts\MainLayout

    string regKey = "DevExpress\\XtraGrid\\Layouts\\MainLayout";
    gridControl1.MainView.SaveLayoutToRegistry(regKey);

    //...

    gridControl1.MainView.RestoreLayoutFromRegistry(regKey);