GridPersistentLayoutColumn Class
Contains information about layout settings for columns.
Namespace: DevExpress.Blazor
Assembly: DevExpress.Blazor.v24.2.dll
NuGet Package: DevExpress.Blazor
#Declaration
public class GridPersistentLayoutColumn :
GridPersistentLayoutColumnBase,
IEquatable<GridPersistentLayoutColumn>
#Remarks
The Grid allows you to save and restore its layout settings that a user can change in the UI. A GridPersistentLayout object stores layout settings at the Grid level. The GridPersistentLayout.Columns collection stores layout settings for columns. Each collection item (a GridPersistentLayoutColumn
object) includes the following data:
Saved information | Grid column parameter | Grid |
---|---|---|
Column type | A column type defined in the markup: data, band, command, or selection. | Layout |
A data field name | Dx |
Layout |
Group index[1] | Dx |
Layout |
Sort index | Dx |
Layout |
Sort direction | Dx |
Layout |
Position | Dx |
Layout |
Visibility | Dx |
Layout |
Width | Dx |
Layout |
Handle the following events to save and restore the Grid layout automatically:
- LayoutAutoSaving – Fires each time the grid’s layout changes and allows you to save the layout.
- LayoutAutoLoading – Fires once the grid component is initialized and allows you to restore the saved layout.
To save and restore the Grid layout on demand (for example, on a button click), call the following methods:
- SaveLayout() – Saves information about a Grid’s layout.
- LoadLayout(GridPersistentLayout) – Loads a layout and applies it to the Grid.