Adaptable Options Reference

Summary

AdaptableOptions is the only object created that AdapTable requires to initialise and run.

It is set up by developers at design-time and passed into the AdapTable constructor at startup.

Caution

  • Adaptable Options contains behaviour and functionality that will never change at run-time.
  • Initial Adaptable State contains objects that users can amend and delete through the AdapTable UI.

The AdaptableOptions class consists of a few 'base' properties and a number of xxxOptions properties which are themselves collections of related properties (e.g. Search, Layout).

Hint

  • Typically you will only need to populate a few of the properties in base AdaptableOptions
  • And you will likely only require a few of the properties in some of the xxxOptions classes.

Any property that is not supplied by the user when populating the object, will use the default value which is the most sensible and popular option.

Adaptable Options Contents

Adaptable Options SectionDetails
Base OptionsKey options required for configuring an AdapTable instance
Action Column OptionsConfigures Action Columns
Alert OptionsConfigures Alerts behaviour and forms
Calendar OptionsDefines Holidays
Cell Summary OptionsSupplies Custom Cell Summary Operations
Charting OptionsManages Charts support for AG Grid Charting
Column OptionsOptions relating to different Column types in AdapTable
Column Filter OptionsManages Column Filtering functionality in AdapTable
Column Menu OptionsConfigures the AdapTable Context and Column Menus
Comment OptionsConfigures Comments
Container OptionsManages the different Div elements and popups used by AdapTable
Context Menu OptionsConfigures the AdapTable Context and Column Menus
Custom Sort OptionsProvides Custom Sort Comparers for Custom Sort
Dashboard OptionsSets the Dashboard including custom items
Data Change History OptionsConfigures how Data Change History operates
Data Import OptionsManages Importing Data into AdapTable
Data Set OptionsProvides Data Sets
Edit OptionsManages Editing in AdapTable
Entitlement OptionsUsed for setting up Permissions and Entitlements in AdapTable
Export OptionsConfigures AdapTable Reports and Export Destinations
Expression OptionsOptions for using AdapTableQL Expressions
FDC3 OptionsOptions for when collaborating via FDC3
Flashing Cell OptionsManages Flashing Cells functionality in AdapTable
Format Column OptionsManages Custom Display Formats in AdapTable
Grid Filter OptionsConfigures the Grid Filter
Layout OptionsHow Layouts in AdapTable will operate
Note OptionsConfigures Notes
Notification OptionsManages Alerts and Toast Notifications
Predicate OptionsOptions for managing Predicates
Quick Search OptionsSets up searching in AdapTable
Row Form OptionsConfigures Row Forms
Settings Panel OptionsConfigures the Settings Panel
State OptionsManages how AdapTable State is persisted (and potentially enriched)
Team Sharing OptionsConfigures the Team Sharing functionality in AdapTable
Tool Panel OptionsSets up the AdapTable ToolPanel Component
User Interface OptionsConfigures how the AdapTable UI works

Plugin Options

Plugin Options SectionDetails
interop Plugin OptionsOptions for when using the interop.io Plugin
ipushpull Plugin OptionsOptions for when using the ipushpull Plugin
OpenFin Plugin OptionsOptions for when using the OpenFin Plugin
Master Detail Plugin OptionsOptions for creating Master Detail Grids

Base Options

Base Options are the properties in the root of Adaptable Options that are not grouped into a section.

Hint

  • These are generally the more important options that need to be set
  • You should try to provide values for each of these properties

The properties in the root of Adaptable Options include:

Base Options PropertyDescriptionMandatory
adaptableIdName for this AdapTable instance
adaptableStateKeyIdentifier for AdapTable State (used with local storage)
licenseKeyKey required for every commercial AdapTable instance
initialStateAdapTable State designed for first time use in Application
primaryKeyColumn containing only unique values, used to identify rows
userNameName of the Current User
adaptableContextContext to use in your application (can be anything)

Function Properties Context

Each section in AdapTable Options is made up of a mix of 2 elements:

  • properties that require a value which is a primitive data type (i.e. a string, number, date or boolean)
  • properties that require custom functions to supplied (which will return the required value)

Hint

Many properties can be of either element, e.g. can be a string or a function that returns a string

Nearly all functions used by AdapTable Options take a single object as the argument.

This object is usually named xxxContext, and contains function-specific data.

Note

This is very similar to the xxxParams pattern used by AG Grid

Each context object derives from BaseContext object which contains 3 properties:

PropertyDescription
adaptableApiAdaptable Api object
adaptableContextCustom application Context provided in AdaptableOptions.adaptableContext
adaptableIdId of current AdapTable instance
adaptableStateKeyCurrent Adaptable State Key
clientTimestampTime on user's computer
userNameName of Current User

Run-Time Access

AdapTable makes run time access to Adaptable Options available via Options API in Adaptable API:

The full set of convenience functions to enable easy access to Adaptable Options properties is:

MethodDescription
addToAdaptableContext(key, value)Adds a key-value pair to the AdaptableContext
clearAdaptableContext()Clears all key-value pairs from the AdaptableContext
getActionColumnOptions()Returns AdaptableOptions.actionColumnOptions
getAdaptableContext()Returns AdaptableOptions.adaptableContext
getAdaptableId()Returns AdaptableOptions.adaptableId
getAdaptableOptions()Returns provided AdaptableOptions
getAdaptableStateKey()Returns AdaptableOptions.adaptableStateKey
getAlertOptions()Returns AdaptableOptions.alertOptions
getCalendarOptions()Returns AdaptableOptions.calendarOptions
getCellSummaryOptions()Returns AdaptableOptions.cellSummaryOptions
getChartingOptions()Returns AdaptableOptions.chartingOptions
getColumnMenuOptions()Returns AdaptableOptions.columnMenuOptions
getColumnOptions()Returns AdaptableOptions.columnOptions
getCommentOptions()Returns AdaptableOptions.commentOptions
getContainerOptions()Returns AdaptableOptions.containerOptions
getContextMenuOptions()Returns AdaptableOptions.contextMenuOptions
getCustomSortOptions()Returns AdaptableOptions.customSortOptions
getDashboardOptions()Returns AdaptableOptions.dashboardOptions
getDataChangeHistoryOptions()Returns AdaptableOptions.dataChangeHistoryOptions
getDataImportOptions()Returns AdaptableOptions.dataImportOptions
getDataSetOptions()Returns AdaptableOptions.dataSetOptions
getEditOptions()Returns AdaptableOptions.editOptions
getEntitlementOptions()Returns AdaptableOptions.entitlementOptions
getExportOptions()Returns AdaptableOptions.exportOptions
getExpressionOptions()Returns AdaptableOptions.expressionOptions
getFdc3Options()Returns AdaptableOptions.fdc3Options
getFilterOptions()Returns AdaptableOptions.filterOptions
getFlashingCellOptions()Returns AdaptableOptions.flashingCellOptions
getFormatColumnOptions()Returns AdaptableOptions.formatColumnOptions
getLayoutOptions()Returns AdaptableOptions.layoutOptions
getLicenseKey()Returns AdaptableOptions.licenseKey
getNoteOptions()Returns AdaptableOptions.noteOptions
getNotificationsOptions()Returns AdaptableOptions.notificationsOptions
getPredicateOptions()Returns AdaptableOptions.predicateOptions
getPrimaryKey()Returns AdaptableOptions.primaryKey
getQuickSearchOptions()Returns AdaptableOptions.quickSearchOptions
getRowFormOptions()Returns AdaptableOptions.rowFormOptions
getSettingsPanelOptions()Returns AdaptableOptions.settingsPanelOptions
getStateOptions()Returns AdaptableOptions.stateOptions
getTeamSharingOptions()Returns AdaptableOptions.teamSharingOptions
getToolPanelOptions()Returns AdaptableOptions.toolPanelOptions
getUserInterfaceOptions()Returns AdaptableOptions.userInterfaceOptions
getUserName()Returns AdaptableOptions.userName
isAutogeneratePrimaryKey()Returns AdaptableOptions.autogeneratePrimaryKey
removeFromAdaptableContext(key)Removes a key from the AdaptableContext

TypeScript Generics

Since AdapTable Version 15, Adaptable Options supports TypeScript Generics.

This allows for improved type safety and developer experience by providing the row data type to the Adaptable Options definition.

Hint

This integrates seamlessly with the AG Grid TypeScript Generics for Row Data

Deep Dive

Using Generics in Adaptable Options