Options for manging Layouts.
Layouts are groups of Column-related properties, i.e. visibility, order, grouping, pivoting, aggregation and width.
There must always be at least one Layout in AdapTable at any time.
This means that if there is no Layout in the Layout Predefined Config, AdapTable will create one called Default Layout based on the current grid setup.
createDefaultLayout property to true, ensures a Default Layout is created even if there are other Layouts in Predefined Config.
Two useful options allow you to auto-size columns in regular and pivot Layotus the first time one is loaded.
This is useful when screen estate is at a premium.
This only works if you have not set your own widths in the Layout config.
If you have the the GridOptions suppressColumnVirtualisation property set to true (in ag-Grid), then only the visible columns will be auto sized
autoSaveLayouts property (which defaults to true) specifies whether Layouts will automatically save when their contents change.
If this property is false then a save button will appear in the Layout Toolbar and only upon clicking that will the Layout save.
The Layout object itself also has an
AutoSave property. If set, that will take precedence of the value set here in Layout Options (but it defaults to using this property).
Layout Options Properties
|autoSaveLayouts||Layouts save whenever Grid's column / sort info changes; if false, a Save button will display||true|
|autoSizeColumnsInLayout||Columns auto-size when Layout loads for first time||false|
|autoSizeColumnsInPivotLayout||Columns auto-size when Pivot-based Layout loads first time||false|
|createDefaultLayout||Whether a "Default Layout" will be created in addition to Layouts in Config (if none there, Default Layout is always created)||false|
|includeExpandedRowGroups||Layouts will include details of expanded grouped rows; if true these will be re-applied at start-up||false|