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:

PropertyTypeDescription
CurrentLayoutstringLayout to be loaded when AdapTable starts (using Name property in Layout); if not provided the first Layout is used
LayoutsLayoutArrayCollection of Layouts - can be Table or Pivot

Base Layout Object

Table Layouts derive from the LayoutBase object defined as follows:

PropertyTypeDescription
AutoSizeColumnsbooleanWhether Columns should autosize when Layout first loads
ColumnFiltersColumnFilter[]Collection of Column Filters to apply in Layout
ColumnGroupValuesColumnGroupValuesDefines which Column Groups are expanded / collapsed
ColumnHeadersColumnStringMapSet of custom header names for some (or all) Columns
ColumnPinningColumnDirectionMapDetails of which Columns are pinned
ColumnSizingColumnSizingMapControls size (width or flex & min/max) for Columns
ColumnSortsColumnSort[]Sorting to apply in the Layout
GrandTotalRow'top' | 'bottom' | 'pinnedTop' | 'pinnedBottom' | booleanPosition of the Grand Total Row in the Layout
GridFilterGridFilterGrid Filter to apply in Layout
NamestringName of the Layout as it appears in the Layout toolbar and tool panel
OpenChartsLayoutOpenChart[]AG Grid charts to open when this layout is selected (by chart UUID or name)
RowGroupDisplayTypeRowGroupDisplayType
RowGroupValuesRowGroupValuesDefines which Row Groups are expanded / collapsed
RowSelectionLayoutRowSelection | falseDefines Row Selection behaviour for Layout; if false, Row Selection is disabled; if undefined, GridOptions is used
SuppressAggFuncInHeaderbooleanHides the aggFunc in Column header: e.g. 'sum(Price)' becomes 'Price'
IsReadOnlybooleanSets Entity to ReadOnly (overwriting a Strategy Entitlement of 'Full')

Table Layout Object

The Table Layout additionally includes these properties:

PropertyTypeDescription
ColumnVisibilityColumnBooleanFalseMapMap of Table Column Visibility
RowGroupedColumnsstring[]Columns which are row-grouped when the Layout is applied
RowSummariesRowSummary[]Pinned Rows that display Aggregation Info for a whole Column
TableAggregationColumnsTableAggregationColumnsColumns showing aggregated values in Grouped Rows; a record of ColumnId and aggfunc (e.g. sum) or 'true' (to use default aggfunc)
TableColumnsstring[]List of Column Ids to include in Table Layout
IsReadOnlybooleanSets Entity to ReadOnly (overwriting a Strategy Entitlement of 'Full')

Column Filter

The ColumnFilters property is a collection of ColumnFilter objects defined as follows:

PropertyTypeDescriptionDefault
ColumnIdstringColumn where Filter should be applied
PredicatesColumnFilterPredicate[]AdaptablePredicate which AdaptableQL will evaluate when the Filter is run
PredicatesOperatorPredicatesOperatorLogic used when combining multiple Predicates ('AND'|'OR')'AND'
IsReadOnlybooleanSets Entity to ReadOnly (overwriting a Strategy Entitlement of 'Full')
IsSuspendedbooleanSuspends (i.e. turns off) an Adaptable Object

Grid Filter

The GridFilter object is defined as follows:

PropertyTypeDescription
ExpressionstringThe (boolean) Expression to run
IsReadOnlybooleanSets Entity to ReadOnly (overwriting a Strategy Entitlement of 'Full')
IsSuspendedbooleanSuspends (i.e. turns off) an Adaptable Object

Column Sort

The ColumnSort object used for sorting is defined as follows:

PropertyTypeDescription
ColumnIdstringId 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:

PropertyTypeDescriptionDefault
CheckboxesbooleanWhether to display checkboxes in Selection Columntrue
CheckboxInGroupColumnbooleanRenders selection checkboxes in Auto-Group Column (if true) or in dedicated Selection Column (if false)false
EnableClickSelectionboolean | 'enableDeselection' | 'enableSelection'Selection behaviour when clicking a row: 'enableSelection' | 'enableDeselection' | true | falsefalse
GroupSelectModeGroupSelectionModeGrouping Select Mode: 'self' | 'descendants' | 'filteredDescendants''self'
HeaderCheckboxbooleanWhether to show checkbox in Header of Selection Column Header ('multiRow' only)true
Mode'singleRow' | 'multiRow'Row Selection Mode: 'singleRow' or 'multiRow'
SelectAllModeSelectAllModeSelect All Mode: 'all' | 'filtered' | 'currentPage''all'

Other Table Layout Properties

PropertyType
ColumnPinningColumnDirectionMap
ColumnSizingColumnSizingMap
ColumnVisibilityColumnBooleanFalseMap
ColumnHeadersColumnStringMap
RowGroupValuesRowGroupValues
ColumnGroupValuesColumnGroupValues

Note