AdapTable and AG Grid Div Elements

Summary

  • By default AdapTable assumes that developers will provide Divs of 'adaptable' and 'grid'
  • However, developers can configure custom Div elements to display AdapTable and AG Grid
  • These are only required when using AdapTable vanilla (i.e. not a framework version)
  • These are configured using the ContainerOptions section of AdapTable Options

The ContainerOptions section of Adaptable Options contains a series of properties relating to various Div elements that can be used in Adaptable.

Two of these are of particular importance when initialising AdapTable (in the vanilla / TypeScript version):

  • adaptableContainer
  • agGridContainer

Note

These are not required if using AdapTable React, AdapTable Angular or AdapTable Vue as they each work differently

Both these properties allow the associated container to be provided in one of 4 ways:

  • string — an element ID (resolved via document.getElementById)
  • AdaptableCssSelector — a CSS selector (resolved via document.querySelector)
  • HTMLElement — a direct reference to a DOM element
  • a JavaScript function which returns any one of the above

AdapTable Container

By default AdapTable should be provided in a Div with the Id of 'adaptable'.

If the default value is not used for this Div, then the bespoke Id of the div needs to be supplied using the adaptableContainer property.

Caution

  • Make sure if you provide an implementation for this property to supply a Div with the same name
  • If not supplied, you will see this error: There is no DIV with id=[Name] so cannot render Adaptable

adaptableContainer

Default: adaptable
Div which contains AdapTable instance (AdapTable vanilla only)

AG Grid Container

By default AG Grid should be provided in a Div with the Id of 'grid'.

If the default value is not used for this Div, then the bespoke Id of the Div needs to be supplied using the agGridContainer property.

agGridContainer

Default: grid
Div which contains AG Grid instance (AdapTable vanilla only)
Deep Dive

Using a Shadow DOM