Column Technical Reference

View as Markdown

Column Options

This class includes an option to show a warning if it cannot find a provided Column.

showMissingColumnsWarning

Default: true
Boolean
Show a Warning when Columns are Missing

ColumnOptions

Options related to managing Columns in Adaptable.

Appends the name of the Column Group to a Column's Friendly Name

Default

false

columnFriendlyName?

(columnFriendlyNameContext:ColumnFriendlyNameContext) => string | undefined

Provide an alternative Friendly Name for a Column

Default

undefined

columnHeader?

(context:ColumnHeaderContext) => string

Provide a custom Header Name for a Table or Pivot Column.

Always invoked when provided, including when the current Layout has a
caption for the Column. Use layoutSpecificHeaderName on the context to
honour a user override, colDefHeaderName for the AG Grid header, or
return your own value.

columnTypes?

TypeHint<string,AdaptableColumnTypeName>[] | ((context:ColumnTypesContext) => TypeHint<string,AdaptableColumnTypeName>[])

Optional list of Column Types - used for Scope and creating Special Columns

Default

Empty Array

Log warning to console if AdapTable cannot find a column

Default

true

columnTypes entries are an AdaptableColumnTypeName:

Value
'hiddenColumn'
'calculatedColumn'
'freeTextColumn'
'actionColumn'
'fdc3Column'
'pivotAnyTotal'
'pivotGrandTotal'
'pivotColumnTotal'
'pivotAggregationTotal'

columnFriendlyName receives a ColumnFriendlyNameContext:

columnHeader receives a ColumnHeaderContext. The context is one of:

Find Out More

See Adaptable Column for the column object itself


Column API

ColumnApi

Columns in the grid: lookup by id or friendly name, data type, visibility and which columns can be sorted, filtered, grouped or exported.

Adds (highlights) a group of Columns to any existing selection

Adds (highlights) a Column to any existing selection

Autosizes all Columns in the Grid

AutoSizes a Column

Autosizes given Columns

Checks if Column has already been created

Resolves the AdapTable DataType for an AG Grid cellDataType key
(custom types map via baseDataType / extendsDataType).

Returns all Aggregatable Columns

getAGGridColDefForColumnId(columnId)
returns

ColDef | ColGroupDef

Returns AG Grid ColDef for a given ColumnId

Returns the AG Grid Column for a given ColumnId

Returns all array columns (number, tuple-number, object-number & text)

Application-registered AG Grid cell data types (from the app's
dataTypeDefinitions), for optional special-column Cell Data Type settings.
Empty when the app has not registered custom types. Does not include
AdapTable baselines (number / text / date / boolean / numberArray).

Returns all boolean Columns

Returns Data Type for the Column with given ColumnId

Returns the AdapTable Column that maps to a given AG Grid ColDef

The ColDef is matched to a Column by colId (falling back to field), mirroring how AG Grid derives a Column's colId

Retrieves ColumnId for Column with given Friendly Name

Retrieves ColumnIds for Columns with given Friendly Names

Returns all Columns available (including hidden, special)

Returns all columns of a given columnType

Gets summary info for a column including filters and unique values

Retrieves Adaptable Columns with given ColumnIds

Returns all Columns that have given DataType

Retrieves Adaptable Columns with given Friendly names

getColumnTypes()
returns

string[]

Returns available columns types defined under columnOptions.columnTypes

Retrieves AdapTable Column with given ColumnId

Retrieves AdapTable Column with given Friendly name

Returns all Date Columns

Returns the default Aggregation Function for a Column

Returns all Exportable Columns

Returns all Filterable Columns

Retrieves Friendly Name of Column with given ColumnId

Retrieves Friendly Names for given ColumnIds

Returns all Groupable Columns

Returns all UI available columns excluding Action, FreeText and Calculated Columns

Returns all number-array columns

Returns all numeric array columns (number, tuple-number, object-number)

Returns all numeric Columns

Returns all object-number-array columns e.g. [x:1,y:2,x:3,y:4]

Returns all Pivotable Columns

Retrieves current Primary Key Column in AdapTable. It may be undefined if the primary key is auto-generated, or it is NOT mapped to a column.

Returns all Queryable Columns

Returns all columns currently Row Grouped

Returns all Sortable Columns

Returns any Action, FreeText and Calculated Columns

Returns all string array Columns

Returns all Text Columns

Returns all tuple-number-array columns e.g. [[1,2],[3,4]]

Returns all Columns that can be displayed in UI (excludes always hidden cols)

Returns Columns that are always hidden in UI (but available for Expressions)

Returns all visible Columns

Checks if the Column with the given columnId has any Array-like DataType (TextArray,NumberArray,TupleNumberArray or ObjectNumberArray)

Checks if the Column with the given columnId has DataType Boolean

Checks if the Column with given Column Identifier (columnId or ColDef) has a specific Column Type

Checks if the Column with the given columnId has DataType Date

Checks if the Column with the given columnId has DataType Number

Checks if the Column with the given columnId has an Numeric Array-like DataType (NumberArray,TupleNumberArray or ObjectNumberArray)

Checks if the Column with the given columnId has a Text Array-like DataType (TextArray)

Hides a Column from Grid

Checks if Column with given ColumnId is an Action Column

Whether column is auto generated by AG Grid (for selection, grouping, pivoting etc)

Checks if Column with given ColumnId is a row-group Column automatically generated by AG Grid

Checks if Column with given ColumnId is a row-group Column automatically generated by AG Grid, for row-grouping with group display type = 'multi'

Checks if Column with given ColumnId is a row-group Column automatically generated by AG Grid, for row-grouping with group display type = 'single'

Checks if Column with given ColumnId is a Calculated Column

Returns true if the given Column exists in the Grid

Checks if Column with given ColumnId is a FDC3 Column

Checks if Column with given ColumnId is a Free Text Column

Checks if Column with given ColumnId is a pivot aggregation column in a pivot layout with no pivot columns.
When PivotColumns is empty, aggregation columns keep their original IDs instead of getting a 'pivot_' prefix.

Checks if Column with given ColumnId is a pivot Column automatically generated by AG Grid

Checks if Column with given ColumnId is a Selection (Checkbox) Column automatically generated by AG Grid

Checks if Column with given ColumnId is a Special (i.e. calculated, freetext or action) Column

Opens Settings Panel with Column Info section selected and visible

Selects all Columns

Selects (highlights) a Column

Selects (highlights) group of Columns

Sets a new Caption / Header for a Column (only for current Layout)

Makes a Column visible