Table Layout Technical Reference
Summary
- Layout State enables Table Layouts to be configured
Find Out More
See General Layouts Technical Reference for details on Layout Options and Layout API
Layout State
Layout State contains a collection of Layouts and the Current Layout:
| Property | Type | Description |
|---|---|---|
| CurrentLayout | string | Layout to be loaded when AdapTable starts (using Name property in Layout); if not provided the first Layout is used |
| Layouts | LayoutArray | Collection of Layouts - can be Table or Pivot |
Base Layout Object
Table Layouts derive from the LayoutBase object defined as follows:
| Property | Type | Description |
|---|---|---|
| AutoSizeColumns | boolean | Whether Columns should autosize when Layout first loads |
| ColumnFilters | ColumnFilter[] | Collection of Column Filters to apply in Layout |
| ColumnGroupValues | ColumnGroupValues | Defines which Column Groups are expanded / collapsed |
| ColumnHeaders | ColumnStringMap | Set of custom header names for some (or all) Columns |
| ColumnPinning | ColumnDirectionMap | Details of which Columns are pinned |
| ColumnSizing | ColumnSizingMap | Controls size (width or flex & min/max) for Columns |
| ColumnSorts | ColumnSort[] | Sorting to apply in the Layout |
| GrandTotalRow | 'top' | 'bottom' | 'pinnedTop' | 'pinnedBottom' | boolean | Position of the Grand Total Row in the Layout |
| GridFilter | GridFilter | Grid Filter to apply in Layout |
| Name | string | Name of the Layout as it appears in the Layout toolbar and tool panel |
| OpenCharts | LayoutOpenChart[] | AG Grid charts to open when this layout is selected (by chart UUID or name) |
| RowGroupDisplayType | RowGroupDisplayType | |
| RowGroupValues | RowGroupValues | Defines which Row Groups are expanded / collapsed |
| RowSelection | LayoutRowSelection | false | Defines Row Selection behaviour for Layout; if false, Row Selection is disabled; if undefined, GridOptions is used |
| SuppressAggFuncInHeader | boolean | Hides the aggFunc in Column header: e.g. 'sum(Price)' becomes 'Price' |
| IsReadOnly | boolean | Sets Entity to ReadOnly (overwriting a Strategy Entitlement of 'Full') |
Table Layout Object
The Table Layout additionally includes these properties:
| Property | Type | Description |
|---|---|---|
| ColumnVisibility | ColumnBooleanFalseMap | Map of Table Column Visibility |
| RowGroupedColumns | string[] | Columns which are row-grouped when the Layout is applied |
| RowSummaries | RowSummary[] | Pinned Rows that display Aggregation Info for a whole Column |
| TableAggregationColumns | TableAggregationColumns | Columns showing aggregated values in Grouped Rows; a record of ColumnId and aggfunc (e.g. sum) or 'true' (to use default aggfunc) |
| TableColumns | string[] | List of Column Ids to include in Table Layout |
| IsReadOnly | boolean | Sets Entity to ReadOnly (overwriting a Strategy Entitlement of 'Full') |
Column Filter
The ColumnFilters property is a collection of ColumnFilter objects defined as follows:
| Property | Type | Description | Default |
|---|---|---|---|
| ColumnId | string | Column where Filter should be applied | |
| Predicates | ColumnFilterPredicate[] | AdaptablePredicate which AdaptableQL will evaluate when the Filter is run | |
| PredicatesOperator | PredicatesOperator | Logic used when combining multiple Predicates ('AND'|'OR') | 'AND' |
| IsReadOnly | boolean | Sets Entity to ReadOnly (overwriting a Strategy Entitlement of 'Full') | |
| IsSuspended | boolean | Suspends (i.e. turns off) an Adaptable Object |
Grid Filter
The GridFilter object is defined as follows:
| Property | Type | Description |
|---|---|---|
| Expression | string | The (boolean) Expression to run |
| IsReadOnly | boolean | Sets Entity to ReadOnly (overwriting a Strategy Entitlement of 'Full') |
| IsSuspended | boolean | Suspends (i.e. turns off) an Adaptable Object |
Column Sort
The ColumnSort object used for sorting is defined as follows:
| Property | Type | Description |
|---|---|---|
| ColumnId | string | Id of Column being sorted |
| SortOrder | 'Asc' | 'Desc' | How Column is sorted - either 'Asc' or 'Desc' |
Row Selection
The LayoutRowSelection object used for row selection is defined as follows:
| Property | Type | Description | Default |
|---|---|---|---|
| Checkboxes | boolean | Whether to display checkboxes in Selection Column | true |
| CheckboxInGroupColumn | boolean | Renders selection checkboxes in Auto-Group Column (if true) or in dedicated Selection Column (if false) | false |
| EnableClickSelection | boolean | 'enableDeselection' | 'enableSelection' | Selection behaviour when clicking a row: 'enableSelection' | 'enableDeselection' | true | false | false |
| GroupSelectMode | GroupSelectionMode | Grouping Select Mode: 'self' | 'descendants' | 'filteredDescendants' | 'self' |
| HeaderCheckbox | boolean | Whether to show checkbox in Header of Selection Column Header ('multiRow' only) | true |
| Mode | 'singleRow' | 'multiRow' | Row Selection Mode: 'singleRow' or 'multiRow' | |
| SelectAllMode | SelectAllMode | Select All Mode: 'all' | 'filtered' | 'currentPage' | 'all' |
Other Table Layout Properties
| Property | Type |
|---|---|
ColumnPinning | ColumnDirectionMap |
ColumnSizing | ColumnSizingMap |
ColumnVisibility | ColumnBooleanFalseMap |
ColumnHeaders | ColumnStringMap |
RowGroupValues | RowGroupValues |
ColumnGroupValues | ColumnGroupValues |
Note
RowGroupValuescontains exceptions of typeRowGroupValuesWithExceptionKeysColumnGroupValuescontains exceptions of typeColumnGroupValuesWithExceptionKeys