Pivot Layout Technical Reference
Summary
- Layout State enables Pivot 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 | Description |
|---|---|
| CurrentLayout | Layout to be loaded when AdapTable starts (using Name property in Layout); if not provided the first Layout is used |
| Layouts | Collection of Layouts - can be Table or Pivot |
Base Layout Object
Pivot Layouts derive from the LayoutBase object defined as follows:
| Property | Description |
|---|---|
| AutoSizeColumns | Whether Columns should autosize when Layout first loads |
| ColumnFilters | Collection of Column Filters to apply in Layout |
| ColumnGroupValues | Defines which Column Groups are expanded / collapsed |
| ColumnHeaders | Set of custom header names for some (or all) Columns |
| ColumnPinning | Details of which Columns are pinned |
| ColumnSizing | Controls size (width or flex & min/max) for Columns |
| ColumnSorts | Sorting to apply in the Layout |
| GrandTotalRow | Position of the Grand Total Row in the Layout |
| GridFilter | Grid Filter to apply in Layout |
| Name | Name of the Layout as it appears in the Layout toolbar and tool panel |
| RowGroupDisplayType | Display Row Grouped Columns as 'single' or 'multi' column |
| RowGroupValues | Defines which Row Groups are expanded / collapsed |
| SuppressAggFuncInHeader | Hides the aggFunc in Column header: e.g. 'sum(Price)' becomes 'Price' |
| IsReadOnly | Sets Entity to ReadOnly (overwriting a Strategy Entitlement of 'Full') |
Pivot Layout Object
The Pivot Layout additionally has:
| Property | Description |
|---|---|
| PivotAggregationColumns | Columns showing aggregated values in Group Rows; 1st value in record is Column name, 2nd is either aggfunc (e.g. sum, avg etc.) or 'true' (to use default aggfunc) |
| PivotColumns | Mandatory list of Columns to pivot (provide empty array if just displaying Aggregations) |
| PivotColumnTotal | Display automatically calculated Totals within EACH Pivot Column Group, in the position specified |
| PivotExpandLevel | How deep to expand Pivot Columns (0 for none, 1 for 1st level only etc, -1 to expand all) |
| PivotGrandTotal | Display automatically calculated Totals of all Pivot Columns, in the position specified |
| PivotGroupedColumns | Columns which are row-grouped when the Layout is applied |
| PivotResultColumnsOrder | Ordered list of Pivot Result Columns; set to true to track current display order, or provide custom list |
| IsReadOnly | 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 | Description | Default |
|---|---|---|
| ColumnId | Column where Filter should be applied | |
| Predicates | AdaptablePredicate which AdaptableQL will evaluate when the Filter is run | |
| PredicatesOperator | Logic used when combining multiple Predicates ('AND'|'OR') | 'AND' |
| IsReadOnly | Sets Entity to ReadOnly (overwriting a Strategy Entitlement of 'Full') | |
| IsSuspended | Suspends (i.e. turns off) an Adaptable Object |
Grid Filter
The GridFilter object is defined as follows:
| Property | Description |
|---|---|
| Expression | The (boolean) Expression to run |
| IsReadOnly | Sets Entity to ReadOnly (overwriting a Strategy Entitlement of 'Full') |
| IsSuspended | Suspends (i.e. turns off) an Adaptable Object |
Column Sort
The ColumnSort object used for sorting is defined as follows:
| Property | Description |
|---|---|
| ColumnId | Id of Column being sorted |
| SortOrder | How Column is sorted - either 'Asc' or 'Desc' |
Other Pivot Layout Properties
| Property | Type |
|---|---|
ColumnPinning | ColumnDirectionMap |
ColumnSizing | ColumnSizingMap |
ColumnHeaders | ColumnStringMap |
RowGroupValues | RowGroupValues |
ColumnGroupValues | ColumnGroupValues |
Note
RowGroupValuescontains exceptions of typeRowGroupValuesWithExceptionKeysColumnGroupValuescontains exceptions of typeColumnGroupValuesWithExceptionKeys