# AdapTable for AG Grid

> AdapTable is a drop-in extension for AG Grid that turns it into a complete data application — layouts, querying, filtering, charting, styled columns, alerts, exports and more, out of the box.

Canonical page: https://www.adaptabletools.com/docs

#### What is AdapTable for AG Grid?

**AdapTable is a drop-in extension for [AG Grid](https://www.ag-grid.com/) that turns it into a complete data application — without you having to build one.**

Add AdapTable alongside your existing AG Grid instance and you immediately get layouts, querying, filtering, charting, styled columns, conditional formatting, exports, alerts, and dozens of other advanced features.

- AG Grid is the best all-round JavaScript DataGrid on the market
- AdapTable builds on top of it without hiding or replacing any of its functionality

All the features that you would otherwise need to build bespoke for all your grids are available [out of the box](https://medium.com/ag-grid/getting-more-from-your-datagrid-introducing-adaptable-blotter-2be5debd7e46).

Everything your users do — sort, filter, format, customise — is persisted, shareable across teams, and fully configurable in code.

AdapTable only works with the **AG Grid Enterprise Version** as it extends many of that Grid's advanced features

<!-- framework: vanilla -->
### Vanilla

**Example: Introducing AdapTable**

How AdapTable integrates with - and extends - AG Grid

- This demo illustrates how AdapTable integrates with the excellent AG Grid providing additional, cutting-edge features for advanced users
- The dummy data it contains is used in most of the demos in this documentation and comes from Github
- The demo (like all examples) includes the 3 elements that are included in every AdapTable-based application (click on 'Show Code' to see more):
  - [Initial Adaptable State](https://www.adaptabletools.com/docs/technical-reference-initial-state/index.md): objects created for first time use
  - [Adaptable Options](https://www.adaptabletools.com/docs/technical-reference-adaptable-options/index.md): configuration settings and JavaScript functions
  - [Adaptable API](https://www.adaptabletools.com/docs/technical-reference-adaptable-api/index.md): providing run-time access to AdapTable functionality
- Each of these are explained in greater length in the demos and pages on this site

- Switch to 'Light Theme' in the Tool Panel to see AdapTable (and AG Grid) in the light theme
- Click on the `Show Code` button above the demo to see all the code used in this example, or `Fork` the demo to extend it

Demo project (Vanilla); the files without a marker are shown below:

```text
src/
  adaptableOptions.ts
  agGridModules.ts     [template]
  columnDefs.ts        [template]
  gridOptions.ts       [template]
  index.ts             [template]
  onAdaptableReady.ts
  rowData.ts           [template]
  styles.css           [template]
index.html             [template]
package.json           [template]
tsconfig.json          [template]
```

Files marked `[template]` are the same in every demo; see the [demo template](https://www.adaptabletools.com/llms/demo-template.md#vanilla).

**`src/adaptableOptions.ts`**

```ts
import {
  AdaptableButton,
  AdaptableOptions,
  CustomColumnMenuContext,
  CustomContextMenuContext,
  CustomToolbarButtonContext,
  DashboardButtonContext,
  UserColumnMenuItem,
  UserContextMenuItem,
} from '@adaptabletools/adaptable';
import {WebFramework} from './rowData';

export const adaptableOptions: AdaptableOptions<WebFramework> = {
  primaryKey: 'id',
  adaptableId: 'Intro to AdapTable',
  dashboardOptions: {
    customToolbars: [
      {
        name: 'CustomToolbar',
        title: 'Custom',
        toolbarButtons: [
          {
            label: (
              button: AdaptableButton<CustomToolbarButtonContext>,
              context: CustomToolbarButtonContext
            ) => {
              return context.adaptableApi.themeApi.getCurrentTheme() == 'light'
                ? 'Switch to Dark Theme'
                : 'Switch to Light Theme';
            },

            onClick: (
              button: AdaptableButton<CustomToolbarButtonContext>,
              context: CustomToolbarButtonContext
            ) => {
              context.adaptableApi.themeApi.getCurrentTheme() == 'light'
                ? context.adaptableApi.themeApi.loadDarkTheme()
                : context.adaptableApi.themeApi.loadLightTheme();
            },
            buttonStyle: {
              tone: 'accent',
              variant: 'raised',
            },
          },
        ],
      },
    ],
    customDashboardButtons: [
      {
        label: 'Current Time',
        onClick: (
          button: AdaptableButton<DashboardButtonContext>,
          context: DashboardButtonContext
        ) => {
          context.adaptableApi.alertApi.showAlertInfo(
            'Current Time',
            new Date().toTimeString()
          );
        },
        buttonStyle: {
          tone: 'info',
          variant: 'text',
        },
      },
    ],
  },
  columnMenuOptions: {
    customColumnMenu: (context: CustomColumnMenuContext) => {
      const {
        defaultAgGridMenuStructure,
        defaultAdaptableMenuStructure,
        adaptableApi,
      } = context;

      const customDashboardMenuItem: UserColumnMenuItem = {
        menuType: 'User',
        label: adaptableApi.dashboardApi.isDashboardCollapsed()
          ? 'Expand Dashboard'
          : 'Collapse Dashboard',
        onClick: () =>
          adaptableApi.dashboardApi.isDashboardCollapsed()
            ? adaptableApi.dashboardApi.expandDashboard()
            : adaptableApi.dashboardApi.collapseDashboard(),
      };

      return [
        customDashboardMenuItem,
        '-',
        ...defaultAgGridMenuStructure,
        '-',
        ...defaultAdaptableMenuStructure,
      ];
    },
  },
  contextMenuOptions: {
    customContextMenu: (context: CustomContextMenuContext) => {
      const {
        defaultAgGridMenuStructure,
        defaultAdaptableMenuStructure,
        adaptableApi,
      } = context;

      const customDashboardMenuItem: UserContextMenuItem = {
        menuType: 'User',
        label: adaptableApi.dashboardApi.isDashboardCollapsed()
          ? 'Expand Dashboard'
          : 'Collapse Dashboard',
        onClick: () =>
          adaptableApi.dashboardApi.isDashboardCollapsed()
            ? adaptableApi.dashboardApi.expandDashboard()
            : adaptableApi.dashboardApi.collapseDashboard(),
      };

      return [
        customDashboardMenuItem,
        '-',
        ...defaultAgGridMenuStructure,
        '-',
        ...defaultAdaptableMenuStructure,
      ];
    },
  },
  initialState: {
    Dashboard: {
      Tabs: [
        {
          Name: 'Demo',
          // Surface the user-defined CustomToolbar on the default tab so
          // the demo shows off a custom toolbar without the user having
          // to click around.
          Toolbars: ['Export', 'GridFilter', 'CustomToolbar'],
        },
        {
          Name: 'Notifications',
          Toolbars: ['Alert', 'SystemStatus'],
        },
      ],
      ModuleButtons: [
        'FormatColumn',
        'DataChangeHistory',
        'CalculatedColumn',
        'Shortcut',
      ],
    },
    StatusBar: {
      StatusBars: [
        {
          Key: 'Center Panel',
          StatusBarPanels: ['Layout', 'ColumnFilter'],
        },
      ],
    },
    Theme: {CurrentTheme: 'dark'},
    Export: {
      CurrentReport: 'Popular Frameworks',
      CurrentFormat: 'JSON',
      Reports: [
        {
          ReportColumnScope: 'ScopeColumns',
          ReportRowScope: 'ExpressionRows',
          Scope: {ColumnIds: ['name', 'language']},
          Expression: '[github_stars] > 50000 ',
          Name: 'Popular Frameworks',
        },
      ],
    },
    Layout: {
      CurrentLayout: 'Sorted Layout',
      Layouts: [
        {
          TableColumns: [
            'name',
            'language',
            'github_stars',
            'rating',
            'license',
            'week_issue_change',
            'created_at',
            'github_watchers',
            'has_wiki',
            'updated_at',
            'pushed_at',
            'description',
            'open_issues_count',
            'closed_issues_count',
            'open_pr_count',
            'closed_pr_count',
            'has_projects',
            'has_pages',
          ],
          Name: 'Sorted Layout',
          ColumnSorts: [
            {
              ColumnId: 'license',
              SortOrder: 'Asc',
            },
            {
              ColumnId: 'name',
              SortOrder: 'Desc',
            },
          ],
          // Filter the grid to a focused set (~21 rows) so the column
          // formatting / styled columns are immediately legible without
          // scrolling. Bind any other expression in the Grid Filter
          // toolbar to refine further.
          GridFilter: {
            Expression: '[github_stars] > 10000',
          },
          AutoSizeColumns: true,
        },
        {
          TableColumns: [
            'name',
            'language',
            'github_stars',
            'rating',
            'license',
            'open_issues_count',
            'closed_issues_count',
            'created_at',
            'has_wiki',
            'updated_at',
            'pushed_at',
            'github_watchers',
            'description',
            'open_pr_count',
            'closed_pr_count',
            'has_projects',
            'has_pages',
            'week_issue_change',
          ],
          Name: 'Grouping Layout',
          RowGroupedColumns: ['language', 'license'],
          TableAggregationColumns: [
            {
              ColumnId: 'open_issues_count',
              AggFunc: 'sum',
            },
            {
              ColumnId: 'closed_issues_count',
              AggFunc: 'max',
            },
          ],
          AutoSizeColumns: true,
        },
      ],
    },
    // Two column-scoped format columns add live styling on the column the
    // user is looking at, paired with display formats so the raw numbers
    // read more naturally. These deliberately target columns (rather than
    // whole rows) so the table content stays the focal point.
    FormatColumn: {
      FormatColumns: [
        {
          Name: 'name-upper',
          Scope: {ColumnIds: ['name']},
          DisplayFormat: {
            Formatter: 'StringFormatter',
            Options: {Case: 'Upper', Trim: false},
          },
        },
        {
          Name: 'created-at-pattern',
          Scope: {ColumnIds: ['created_at']},
          DisplayFormat: {
            Formatter: 'DateFormatter',
            Options: {Pattern: 'yyyy/MM/dd'},
          },
        },
        {
          Name: 'github-stars-thousands',
          Scope: {ColumnIds: ['github_stars']},
          DisplayFormat: {
            Formatter: 'NumberFormatter',
            Options: {IntegerSeparator: ','},
          },
        },
        {
          Name: 'github-stars-highlight',
          Scope: {ColumnIds: ['github_stars']},
          Rule: '[github_stars] > 100000',
          Style: {
            FontWeight: 'Bold',
            ForeColor: 'var(--ab-color-accent)',
          },
        },
        {
          Name: 'week-issue-change-parens',
          Scope: {ColumnIds: ['week_issue_change']},
          DisplayFormat: {
            Formatter: 'NumberFormatter',
            Options: {Parentheses: true},
          },
        },
        {
          Name: 'week-issue-change-positive',
          Scope: {ColumnIds: ['week_issue_change']},
          Rule: '[week_issue_change] > 0',
          Style: {
            ForeColor: 'var(--ab-color-success)',
            FontWeight: 'Bold',
          },
        },
        {
          Name: 'week-issue-change-negative',
          Scope: {ColumnIds: ['week_issue_change']},
          Rule: '[week_issue_change] < 0',
          Style: {
            ForeColor: 'var(--ab-color-destructive)',
            FontWeight: 'Bold',
          },
        },
      ],
    },
    // Two styled columns: language is rendered as a coloured pill that
    // makes the stack instantly scannable; rating turns the new 1–5
    // number into a row of stars.
    StyledColumn: {
      StyledColumns: [
        {
          Name: 'Language Badge',
          ColumnId: 'language',
          BadgeStyle: {
            Badges: [
              {
                Rule: '[language] = "JavaScript"',
                PillStyle: {BackColor: '#f7df1e', ForeColor: '#1a1a1a'},
              },
              {
                Rule: '[language] = "TypeScript"',
                PillStyle: {BackColor: '#3178c6', ForeColor: 'var(--ab-color-palette-14)'},
              },
              {
                Rule: '[language] = "HTML"',
                PillStyle: {BackColor: '#e34c26', ForeColor: 'var(--ab-color-palette-14)'},
              },
            ],
          },
        },
        {
          Name: 'Rating',
          ColumnId: 'rating',
          RatingStyle: {
            Icon: 'Star',
            Max: 5,
            Size: 14,
            Gap: 2,
            AllowHalf: true,
            ShowValue: false,
          },
        },
      ],
    },
  },
};
```

**`src/onAdaptableReady.ts`**

```ts
import {AdaptableReadyInfo} from '@adaptabletools/adaptable';

export const onAdaptableReady = ({adaptableApi}: AdaptableReadyInfo) => {
  adaptableApi.toolPanelApi.openAdapTableToolPanel();
};
```

<!-- /framework -->

<!-- framework: angular -->
### Angular

#### What is AdapTable for AG Grid Angular?

AdapTable for AG Grid Angular is a lightweight wrapper around [AG Grid Angular](https://www.ag-grid.com/angular-data-grid/getting-started/).

It enables AdapTable to be **instantiated** and referenced inside an Angular application, and used, in a recognisably **Angular way**.

AdapTable supports whichever versions of Angular are being supported by AG Grid; currently that is **Angular 20 - 22**

It integrates directly with, and extends, the AG Grid Angular Component, and enables [Angular Custom Components](https://www.adaptabletools.com/docs/ui-tutorial-building-custom-components/index.md) to be provided to AdapTable in a framework-friendly fashion.

- Other than [Installation](https://www.adaptabletools.com/docs/angular-installation/index.md) & [Integration](https://www.adaptabletools.com/docs/angular-integration/index.md), everything you do in AdapTable Angular is the same as AdapTable Vanilla
- e.g. create [Adaptable Options](https://www.adaptabletools.com/docs/technical-reference-adaptable-options/index.md), write [Initial Adaptable State](https://www.adaptabletools.com/docs/dev-guide-adaptable-state-initial-state/index.md) and use the [Adaptable API](https://www.adaptabletools.com/docs/technical-reference-adaptable-api/index.md) etc.

**Example: Introducing AdapTable**

How AdapTable integrates with - and extends - AG Grid

- This demo illustrates how AdapTable  for Angular integrates with the excellent AG Grid providing additional, cutting-edge features for advanced users.
- The dummy data it contains is used in most of the demos in this documentation and comes from Github.
- The demo includes the 3 elements that are typically included in every AdapTable-based application (click on 'Show Code' to see more):
  - [Initial Adaptable State](https://www.adaptabletools.com/docs/technical-reference-initial-state/index.md): objects created for first time use
  - [Adaptable Options](https://www.adaptabletools.com/docs/technical-reference-adaptable-options/index.md): configuration settings and JavaScript functions
  - [Adaptable API](https://www.adaptabletools.com/docs/technical-reference-adaptable-api/index.md): providing run-time access to AdapTable functionality
- Each of these are explained in greater length in the demos and pages on this site.

- Switch to 'Light Theme' in the Tool Panel to see AdapTable (and AG Grid) in the light theme
- Click on the `Show Code` button above the demo to see all the code used in this example, or `Fork` the demo to extend it

Demo project (Vanilla); the files without a marker are shown below:

```text
src/
  adaptableOptions.ts
  agGridModules.ts     [template]
  columnDefs.ts        [template]
  gridOptions.ts       [template]
  index.ts             [template]
  onAdaptableReady.ts
  rowData.ts           [template]
  styles.css           [template]
index.html             [template]
package.json           [template]
tsconfig.json          [template]
```

Files marked `[template]` are the same in every demo; see the [demo template](https://www.adaptabletools.com/llms/demo-template.md#vanilla).

**`src/adaptableOptions.ts`**

```ts
import {
  AdaptableButton,
  AdaptableOptions,
  CustomColumnMenuContext,
  CustomContextMenuContext,
  CustomToolbarButtonContext,
  DashboardButtonContext,
  UserColumnMenuItem,
  UserContextMenuItem,
} from '@adaptabletools/adaptable';
import {WebFramework} from './rowData';

export const adaptableOptions: AdaptableOptions<WebFramework> = {
  primaryKey: 'id',
  adaptableId: 'Intro to AdapTable',
  dashboardOptions: {
    customToolbars: [
      {
        name: 'CustomToolbar',
        title: 'Custom',
        toolbarButtons: [
          {
            label: (
              button: AdaptableButton<CustomToolbarButtonContext>,
              context: CustomToolbarButtonContext
            ) => {
              return context.adaptableApi.themeApi.getCurrentTheme() == 'light'
                ? 'Switch to Dark Theme'
                : 'Switch to Light Theme';
            },

            onClick: (
              button: AdaptableButton<CustomToolbarButtonContext>,
              context: CustomToolbarButtonContext
            ) => {
              context.adaptableApi.themeApi.getCurrentTheme() == 'light'
                ? context.adaptableApi.themeApi.loadDarkTheme()
                : context.adaptableApi.themeApi.loadLightTheme();
            },
            buttonStyle: {
              tone: 'accent',
              variant: 'raised',
            },
          },
        ],
      },
    ],
    customDashboardButtons: [
      {
        label: 'Current Time',
        onClick: (
          button: AdaptableButton<DashboardButtonContext>,
          context: DashboardButtonContext
        ) => {
          context.adaptableApi.alertApi.showAlertInfo(
            'Current Time',
            new Date().toTimeString()
          );
        },
        buttonStyle: {
          tone: 'info',
          variant: 'text',
        },
      },
    ],
  },
  columnMenuOptions: {
    customColumnMenu: (context: CustomColumnMenuContext) => {
      const {
        defaultAgGridMenuStructure,
        defaultAdaptableMenuStructure,
        adaptableApi,
      } = context;

      const customDashboardMenuItem: UserColumnMenuItem = {
        menuType: 'User',
        label: adaptableApi.dashboardApi.isDashboardCollapsed()
          ? 'Expand Dashboard'
          : 'Collapse Dashboard',
        onClick: () =>
          adaptableApi.dashboardApi.isDashboardCollapsed()
            ? adaptableApi.dashboardApi.expandDashboard()
            : adaptableApi.dashboardApi.collapseDashboard(),
      };

      return [
        customDashboardMenuItem,
        '-',
        ...defaultAgGridMenuStructure,
        '-',
        ...defaultAdaptableMenuStructure,
      ];
    },
  },
  contextMenuOptions: {
    customContextMenu: (context: CustomContextMenuContext) => {
      const {
        defaultAgGridMenuStructure,
        defaultAdaptableMenuStructure,
        adaptableApi,
      } = context;

      const customDashboardMenuItem: UserContextMenuItem = {
        menuType: 'User',
        label: adaptableApi.dashboardApi.isDashboardCollapsed()
          ? 'Expand Dashboard'
          : 'Collapse Dashboard',
        onClick: () =>
          adaptableApi.dashboardApi.isDashboardCollapsed()
            ? adaptableApi.dashboardApi.expandDashboard()
            : adaptableApi.dashboardApi.collapseDashboard(),
      };

      return [
        customDashboardMenuItem,
        '-',
        ...defaultAgGridMenuStructure,
        '-',
        ...defaultAdaptableMenuStructure,
      ];
    },
  },
  initialState: {
    Dashboard: {
      Tabs: [
        {
          Name: 'Demo',
          // Surface the user-defined CustomToolbar on the default tab so
          // the demo shows off a custom toolbar without the user having
          // to click around.
          Toolbars: ['Export', 'GridFilter', 'CustomToolbar'],
        },
        {
          Name: 'Notifications',
          Toolbars: ['Alert', 'SystemStatus'],
        },
      ],
      ModuleButtons: [
        'FormatColumn',
        'DataChangeHistory',
        'CalculatedColumn',
        'Shortcut',
      ],
    },
    StatusBar: {
      StatusBars: [
        {
          Key: 'Center Panel',
          StatusBarPanels: ['Layout', 'ColumnFilter'],
        },
      ],
    },
    Theme: {CurrentTheme: 'dark'},
    Export: {
      CurrentReport: 'Popular Frameworks',
      CurrentFormat: 'JSON',
      Reports: [
        {
          ReportColumnScope: 'ScopeColumns',
          ReportRowScope: 'ExpressionRows',
          Scope: {ColumnIds: ['name', 'language']},
          Expression: '[github_stars] > 50000 ',
          Name: 'Popular Frameworks',
        },
      ],
    },
    Layout: {
      CurrentLayout: 'Sorted Layout',
      Layouts: [
        {
          TableColumns: [
            'name',
            'language',
            'github_stars',
            'rating',
            'license',
            'week_issue_change',
            'created_at',
            'github_watchers',
            'has_wiki',
            'updated_at',
            'pushed_at',
            'description',
            'open_issues_count',
            'closed_issues_count',
            'open_pr_count',
            'closed_pr_count',
            'has_projects',
            'has_pages',
          ],
          Name: 'Sorted Layout',
          ColumnSorts: [
            {
              ColumnId: 'license',
              SortOrder: 'Asc',
            },
            {
              ColumnId: 'name',
              SortOrder: 'Desc',
            },
          ],
          // Filter the grid to a focused set (~21 rows) so the column
          // formatting / styled columns are immediately legible without
          // scrolling. Bind any other expression in the Grid Filter
          // toolbar to refine further.
          GridFilter: {
            Expression: '[github_stars] > 10000',
          },
          AutoSizeColumns: true,
        },
        {
          TableColumns: [
            'name',
            'language',
            'github_stars',
            'rating',
            'license',
            'open_issues_count',
            'closed_issues_count',
            'created_at',
            'has_wiki',
            'updated_at',
            'pushed_at',
            'github_watchers',
            'description',
            'open_pr_count',
            'closed_pr_count',
            'has_projects',
            'has_pages',
            'week_issue_change',
          ],
          Name: 'Grouping Layout',
          RowGroupedColumns: ['language', 'license'],
          TableAggregationColumns: [
            {
              ColumnId: 'open_issues_count',
              AggFunc: 'sum',
            },
            {
              ColumnId: 'closed_issues_count',
              AggFunc: 'max',
            },
          ],
          AutoSizeColumns: true,
        },
      ],
    },
    // Two column-scoped format columns add live styling on the column the
    // user is looking at, paired with display formats so the raw numbers
    // read more naturally. These deliberately target columns (rather than
    // whole rows) so the table content stays the focal point.
    FormatColumn: {
      FormatColumns: [
        {
          Name: 'name-upper',
          Scope: {ColumnIds: ['name']},
          DisplayFormat: {
            Formatter: 'StringFormatter',
            Options: {Case: 'Upper', Trim: false},
          },
        },
        {
          Name: 'created-at-pattern',
          Scope: {ColumnIds: ['created_at']},
          DisplayFormat: {
            Formatter: 'DateFormatter',
            Options: {Pattern: 'yyyy/MM/dd'},
          },
        },
        {
          Name: 'github-stars-thousands',
          Scope: {ColumnIds: ['github_stars']},
          DisplayFormat: {
            Formatter: 'NumberFormatter',
            Options: {IntegerSeparator: ','},
          },
        },
        {
          Name: 'github-stars-highlight',
          Scope: {ColumnIds: ['github_stars']},
          Rule: '[github_stars] > 100000',
          Style: {
            FontWeight: 'Bold',
            ForeColor: 'var(--ab-color-accent)',
          },
        },
        {
          Name: 'week-issue-change-parens',
          Scope: {ColumnIds: ['week_issue_change']},
          DisplayFormat: {
            Formatter: 'NumberFormatter',
            Options: {Parentheses: true},
          },
        },
        {
          Name: 'week-issue-change-positive',
          Scope: {ColumnIds: ['week_issue_change']},
          Rule: '[week_issue_change] > 0',
          Style: {
            ForeColor: 'var(--ab-color-success)',
            FontWeight: 'Bold',
          },
        },
        {
          Name: 'week-issue-change-negative',
          Scope: {ColumnIds: ['week_issue_change']},
          Rule: '[week_issue_change] < 0',
          Style: {
            ForeColor: 'var(--ab-color-destructive)',
            FontWeight: 'Bold',
          },
        },
      ],
    },
    // Two styled columns: language is rendered as a coloured pill that
    // makes the stack instantly scannable; rating turns the new 1–5
    // number into a row of stars.
    StyledColumn: {
      StyledColumns: [
        {
          Name: 'Language Badge',
          ColumnId: 'language',
          BadgeStyle: {
            Badges: [
              {
                Rule: '[language] = "JavaScript"',
                PillStyle: {BackColor: '#f7df1e', ForeColor: '#1a1a1a'},
              },
              {
                Rule: '[language] = "TypeScript"',
                PillStyle: {BackColor: '#3178c6', ForeColor: 'var(--ab-color-palette-14)'},
              },
              {
                Rule: '[language] = "HTML"',
                PillStyle: {BackColor: '#e34c26', ForeColor: 'var(--ab-color-palette-14)'},
              },
            ],
          },
        },
        {
          Name: 'Rating',
          ColumnId: 'rating',
          RatingStyle: {
            Icon: 'Star',
            Max: 5,
            Size: 14,
            Gap: 2,
            AllowHalf: true,
            ShowValue: false,
          },
        },
      ],
    },
  },
};
```

**`src/onAdaptableReady.ts`**

```ts
import {AdaptableReadyInfo} from '@adaptabletools/adaptable';

export const onAdaptableReady = ({adaptableApi}: AdaptableReadyInfo) => {
  adaptableApi.toolPanelApi.openAdapTableToolPanel();
};
```

<!-- /framework -->

<!-- framework: react -->
### React

#### What is AdapTable for AG Grid React?

AdapTable for AG Grid React is a lightweight wrapper around [AG Grid React](https://www.ag-grid.com/react-data-grid/getting-started/).

It enables AdapTable to be **instantiated** and referenced inside a React application, and used, in a recognisably **React way**.

AdapTable requires React 18 or 19 - please make sure you are using one of these React versions in your application

It integrates directly with, and extends, the AG Grid React Component, and enables [React Custom Components](https://www.adaptabletools.com/docs/ui-tutorial-building-custom-components/index.md) to be provided to AdapTable in a framework-friendly fashion.

- Other than [Installation](https://www.adaptabletools.com/docs/angular-installation/index.md) & [Integration](https://www.adaptabletools.com/docs/angular-integration/index.md), everything you do in AdapTable React is the same as AdapTable Vanilla
- e.g. create [Adaptable Options](https://www.adaptabletools.com/docs/technical-reference-adaptable-options/index.md), write [Initial Adaptable State](https://www.adaptabletools.com/docs/dev-guide-adaptable-state-initial-state/index.md) and use the [Adaptable API](https://www.adaptabletools.com/docs/technical-reference-adaptable-api/index.md) etc.

**Example: Introducing AdapTable**

How AdapTable integrates with - and extends - AG Grid

- This demo illustrates how AdapTable for React integrates with the excellent AG Grid providing additional, cutting-edge features for advanced users.
- The dummy data it contains is used in most of the demos in this documentation and comes from Github.
- The demo includes the 3 elements that are typically included in every AdapTable-based application (click on 'Show Code' to see more):
  - [Initial Adaptable State](https://www.adaptabletools.com/docs/technical-reference-initial-state/index.md): objects created for first time use
  - [Adaptable Options](https://www.adaptabletools.com/docs/technical-reference-adaptable-options/index.md): configuration settings and JavaScript functions
  - [Adaptable API](https://www.adaptabletools.com/docs/technical-reference-adaptable-api/index.md): providing run-time access to AdapTable functionality
- Each of these are explained in greater length in the demos and pages on this site.

- Switch to 'Light Theme' in the Tool Panel to see AdapTable (and AG Grid) in the light theme
- Click on the `Show Code` button above the demo to see all the code used in this example, or `Fork` the demo to extend it

Demo project (Vanilla); the files without a marker are shown below:

```text
src/
  adaptableOptions.ts
  agGridModules.ts     [template]
  columnDefs.ts        [template]
  gridOptions.ts       [template]
  index.ts             [template]
  onAdaptableReady.ts
  rowData.ts           [template]
  styles.css           [template]
index.html             [template]
package.json           [template]
tsconfig.json          [template]
```

Files marked `[template]` are the same in every demo; see the [demo template](https://www.adaptabletools.com/llms/demo-template.md#vanilla).

**`src/adaptableOptions.ts`**

```ts
import {
  AdaptableButton,
  AdaptableOptions,
  CustomColumnMenuContext,
  CustomContextMenuContext,
  CustomToolbarButtonContext,
  DashboardButtonContext,
  UserColumnMenuItem,
  UserContextMenuItem,
} from '@adaptabletools/adaptable';
import {WebFramework} from './rowData';

export const adaptableOptions: AdaptableOptions<WebFramework> = {
  primaryKey: 'id',
  adaptableId: 'Intro to AdapTable',
  dashboardOptions: {
    customToolbars: [
      {
        name: 'CustomToolbar',
        title: 'Custom',
        toolbarButtons: [
          {
            label: (
              button: AdaptableButton<CustomToolbarButtonContext>,
              context: CustomToolbarButtonContext
            ) => {
              return context.adaptableApi.themeApi.getCurrentTheme() == 'light'
                ? 'Switch to Dark Theme'
                : 'Switch to Light Theme';
            },

            onClick: (
              button: AdaptableButton<CustomToolbarButtonContext>,
              context: CustomToolbarButtonContext
            ) => {
              context.adaptableApi.themeApi.getCurrentTheme() == 'light'
                ? context.adaptableApi.themeApi.loadDarkTheme()
                : context.adaptableApi.themeApi.loadLightTheme();
            },
            buttonStyle: {
              tone: 'accent',
              variant: 'raised',
            },
          },
        ],
      },
    ],
    customDashboardButtons: [
      {
        label: 'Current Time',
        onClick: (
          button: AdaptableButton<DashboardButtonContext>,
          context: DashboardButtonContext
        ) => {
          context.adaptableApi.alertApi.showAlertInfo(
            'Current Time',
            new Date().toTimeString()
          );
        },
        buttonStyle: {
          tone: 'info',
          variant: 'text',
        },
      },
    ],
  },
  columnMenuOptions: {
    customColumnMenu: (context: CustomColumnMenuContext) => {
      const {
        defaultAgGridMenuStructure,
        defaultAdaptableMenuStructure,
        adaptableApi,
      } = context;

      const customDashboardMenuItem: UserColumnMenuItem = {
        menuType: 'User',
        label: adaptableApi.dashboardApi.isDashboardCollapsed()
          ? 'Expand Dashboard'
          : 'Collapse Dashboard',
        onClick: () =>
          adaptableApi.dashboardApi.isDashboardCollapsed()
            ? adaptableApi.dashboardApi.expandDashboard()
            : adaptableApi.dashboardApi.collapseDashboard(),
      };

      return [
        customDashboardMenuItem,
        '-',
        ...defaultAgGridMenuStructure,
        '-',
        ...defaultAdaptableMenuStructure,
      ];
    },
  },
  contextMenuOptions: {
    customContextMenu: (context: CustomContextMenuContext) => {
      const {
        defaultAgGridMenuStructure,
        defaultAdaptableMenuStructure,
        adaptableApi,
      } = context;

      const customDashboardMenuItem: UserContextMenuItem = {
        menuType: 'User',
        label: adaptableApi.dashboardApi.isDashboardCollapsed()
          ? 'Expand Dashboard'
          : 'Collapse Dashboard',
        onClick: () =>
          adaptableApi.dashboardApi.isDashboardCollapsed()
            ? adaptableApi.dashboardApi.expandDashboard()
            : adaptableApi.dashboardApi.collapseDashboard(),
      };

      return [
        customDashboardMenuItem,
        '-',
        ...defaultAgGridMenuStructure,
        '-',
        ...defaultAdaptableMenuStructure,
      ];
    },
  },
  initialState: {
    Dashboard: {
      Tabs: [
        {
          Name: 'Demo',
          // Surface the user-defined CustomToolbar on the default tab so
          // the demo shows off a custom toolbar without the user having
          // to click around.
          Toolbars: ['Export', 'GridFilter', 'CustomToolbar'],
        },
        {
          Name: 'Notifications',
          Toolbars: ['Alert', 'SystemStatus'],
        },
      ],
      ModuleButtons: [
        'FormatColumn',
        'DataChangeHistory',
        'CalculatedColumn',
        'Shortcut',
      ],
    },
    StatusBar: {
      StatusBars: [
        {
          Key: 'Center Panel',
          StatusBarPanels: ['Layout', 'ColumnFilter'],
        },
      ],
    },
    Theme: {CurrentTheme: 'dark'},
    Export: {
      CurrentReport: 'Popular Frameworks',
      CurrentFormat: 'JSON',
      Reports: [
        {
          ReportColumnScope: 'ScopeColumns',
          ReportRowScope: 'ExpressionRows',
          Scope: {ColumnIds: ['name', 'language']},
          Expression: '[github_stars] > 50000 ',
          Name: 'Popular Frameworks',
        },
      ],
    },
    Layout: {
      CurrentLayout: 'Sorted Layout',
      Layouts: [
        {
          TableColumns: [
            'name',
            'language',
            'github_stars',
            'rating',
            'license',
            'week_issue_change',
            'created_at',
            'github_watchers',
            'has_wiki',
            'updated_at',
            'pushed_at',
            'description',
            'open_issues_count',
            'closed_issues_count',
            'open_pr_count',
            'closed_pr_count',
            'has_projects',
            'has_pages',
          ],
          Name: 'Sorted Layout',
          ColumnSorts: [
            {
              ColumnId: 'license',
              SortOrder: 'Asc',
            },
            {
              ColumnId: 'name',
              SortOrder: 'Desc',
            },
          ],
          // Filter the grid to a focused set (~21 rows) so the column
          // formatting / styled columns are immediately legible without
          // scrolling. Bind any other expression in the Grid Filter
          // toolbar to refine further.
          GridFilter: {
            Expression: '[github_stars] > 10000',
          },
          AutoSizeColumns: true,
        },
        {
          TableColumns: [
            'name',
            'language',
            'github_stars',
            'rating',
            'license',
            'open_issues_count',
            'closed_issues_count',
            'created_at',
            'has_wiki',
            'updated_at',
            'pushed_at',
            'github_watchers',
            'description',
            'open_pr_count',
            'closed_pr_count',
            'has_projects',
            'has_pages',
            'week_issue_change',
          ],
          Name: 'Grouping Layout',
          RowGroupedColumns: ['language', 'license'],
          TableAggregationColumns: [
            {
              ColumnId: 'open_issues_count',
              AggFunc: 'sum',
            },
            {
              ColumnId: 'closed_issues_count',
              AggFunc: 'max',
            },
          ],
          AutoSizeColumns: true,
        },
      ],
    },
    // Two column-scoped format columns add live styling on the column the
    // user is looking at, paired with display formats so the raw numbers
    // read more naturally. These deliberately target columns (rather than
    // whole rows) so the table content stays the focal point.
    FormatColumn: {
      FormatColumns: [
        {
          Name: 'name-upper',
          Scope: {ColumnIds: ['name']},
          DisplayFormat: {
            Formatter: 'StringFormatter',
            Options: {Case: 'Upper', Trim: false},
          },
        },
        {
          Name: 'created-at-pattern',
          Scope: {ColumnIds: ['created_at']},
          DisplayFormat: {
            Formatter: 'DateFormatter',
            Options: {Pattern: 'yyyy/MM/dd'},
          },
        },
        {
          Name: 'github-stars-thousands',
          Scope: {ColumnIds: ['github_stars']},
          DisplayFormat: {
            Formatter: 'NumberFormatter',
            Options: {IntegerSeparator: ','},
          },
        },
        {
          Name: 'github-stars-highlight',
          Scope: {ColumnIds: ['github_stars']},
          Rule: '[github_stars] > 100000',
          Style: {
            FontWeight: 'Bold',
            ForeColor: 'var(--ab-color-accent)',
          },
        },
        {
          Name: 'week-issue-change-parens',
          Scope: {ColumnIds: ['week_issue_change']},
          DisplayFormat: {
            Formatter: 'NumberFormatter',
            Options: {Parentheses: true},
          },
        },
        {
          Name: 'week-issue-change-positive',
          Scope: {ColumnIds: ['week_issue_change']},
          Rule: '[week_issue_change] > 0',
          Style: {
            ForeColor: 'var(--ab-color-success)',
            FontWeight: 'Bold',
          },
        },
        {
          Name: 'week-issue-change-negative',
          Scope: {ColumnIds: ['week_issue_change']},
          Rule: '[week_issue_change] < 0',
          Style: {
            ForeColor: 'var(--ab-color-destructive)',
            FontWeight: 'Bold',
          },
        },
      ],
    },
    // Two styled columns: language is rendered as a coloured pill that
    // makes the stack instantly scannable; rating turns the new 1–5
    // number into a row of stars.
    StyledColumn: {
      StyledColumns: [
        {
          Name: 'Language Badge',
          ColumnId: 'language',
          BadgeStyle: {
            Badges: [
              {
                Rule: '[language] = "JavaScript"',
                PillStyle: {BackColor: '#f7df1e', ForeColor: '#1a1a1a'},
              },
              {
                Rule: '[language] = "TypeScript"',
                PillStyle: {BackColor: '#3178c6', ForeColor: 'var(--ab-color-palette-14)'},
              },
              {
                Rule: '[language] = "HTML"',
                PillStyle: {BackColor: '#e34c26', ForeColor: 'var(--ab-color-palette-14)'},
              },
            ],
          },
        },
        {
          Name: 'Rating',
          ColumnId: 'rating',
          RatingStyle: {
            Icon: 'Star',
            Max: 5,
            Size: 14,
            Gap: 2,
            AllowHalf: true,
            ShowValue: false,
          },
        },
      ],
    },
  },
};
```

**`src/onAdaptableReady.ts`**

```ts
import {AdaptableReadyInfo} from '@adaptabletools/adaptable';

export const onAdaptableReady = ({adaptableApi}: AdaptableReadyInfo) => {
  adaptableApi.toolPanelApi.openAdapTableToolPanel();
};
```

### React Hooks

AdapTable React provides [3 custom React hooks](https://www.adaptabletools.com/docs/react-adaptable-hooks/index.md) which you can use in your React components, enabling you to interact with [Adaptable State](https://www.adaptabletools.com/docs/dev-guide-adaptable-state/index.md), the current [Layout](https://www.adaptabletools.com/docs/handbook-layouts/index.md) and the [Adaptable API](https://www.adaptabletools.com/docs/technical-reference-adaptable-api/index.md) in a more natural React-way.

- `useAdaptableState`
- `useCurrentLayout`
- `useAdaptableApi`

<!-- /framework -->

<!-- framework: vue -->
### Vue

#### What is AdapTable for AG Grid Vue?

AdapTable for AG Grid Vue is a lightweight wrapper around [AG Grid Vue](https://www.ag-grid.com/vue-data-grid/getting-started/).

It enables AdapTable to be **instantiated** and referenced inside a Vue application, and used, in a recognisably **Vue way**.

- AdapTable requires **Vue 3.5.32** or higher
- That is the minimum required by [AG Grid 36](https://www.ag-grid.com/vue-data-grid/compatibility/)

It integrates directly with, and extends, the AG Grid Vue Component, and enables [Vue Custom Components](https://www.adaptabletools.com/docs/ui-tutorial-building-custom-components/index.md) to be provided to AdapTable in a framework-friendly fashion.

- Other than [Installation](https://www.adaptabletools.com/docs/angular-installation/index.md) & [Integration](https://www.adaptabletools.com/docs/angular-integration/index.md), everything you do in AdapTable Vue is the same as AdapTable Vanilla
- e.g. create [Adaptable Options](https://www.adaptabletools.com/docs/technical-reference-adaptable-options/index.md), write [Initial Adaptable State](https://www.adaptabletools.com/docs/dev-guide-adaptable-state-initial-state/index.md) and use the [Adaptable API](https://www.adaptabletools.com/docs/technical-reference-adaptable-api/index.md) etc.

**Example: Introducing AdapTable**

How AdapTable integrates with - and extends - AG Grid

- This demo illustrates how AdapTable for Vue integrates with the excellent AG Grid providing additional, cutting-edge features for advanced users.
- The dummy data it contains is used in most of the demos in this documentation and comes from Github.
- The demo includes the 3 elements that are typically included in every AdapTable-based application (click on 'Show Code' to see more):
  - [Initial Adaptable State](https://www.adaptabletools.com/docs/technical-reference-initial-state/index.md): objects created for first time use
  - [Adaptable Options](https://www.adaptabletools.com/docs/technical-reference-adaptable-options/index.md): configuration settings and JavaScript functions
  - [Adaptable API](https://www.adaptabletools.com/docs/technical-reference-adaptable-api/index.md): providing run-time access to AdapTable functionality
- Each of these are explained in greater length in the demos and pages on this site.

- Switch to 'Light Theme' in the Tool Panel to see AdapTable (and AG Grid) in the light theme
- Click on the `Show Code` button above the demo to see all the code used in this example, or `Fork` the demo to extend it

Demo project (Vanilla); the files without a marker are shown below:

```text
src/
  adaptableOptions.ts
  agGridModules.ts     [template]
  columnDefs.ts        [template]
  gridOptions.ts       [template]
  index.ts             [template]
  onAdaptableReady.ts
  rowData.ts           [template]
  styles.css           [template]
index.html             [template]
package.json           [template]
tsconfig.json          [template]
```

Files marked `[template]` are the same in every demo; see the [demo template](https://www.adaptabletools.com/llms/demo-template.md#vanilla).

**`src/adaptableOptions.ts`**

```ts
import {
  AdaptableButton,
  AdaptableOptions,
  CustomColumnMenuContext,
  CustomContextMenuContext,
  CustomToolbarButtonContext,
  DashboardButtonContext,
  UserColumnMenuItem,
  UserContextMenuItem,
} from '@adaptabletools/adaptable';
import {WebFramework} from './rowData';

export const adaptableOptions: AdaptableOptions<WebFramework> = {
  primaryKey: 'id',
  adaptableId: 'Intro to AdapTable',
  dashboardOptions: {
    customToolbars: [
      {
        name: 'CustomToolbar',
        title: 'Custom',
        toolbarButtons: [
          {
            label: (
              button: AdaptableButton<CustomToolbarButtonContext>,
              context: CustomToolbarButtonContext
            ) => {
              return context.adaptableApi.themeApi.getCurrentTheme() == 'light'
                ? 'Switch to Dark Theme'
                : 'Switch to Light Theme';
            },

            onClick: (
              button: AdaptableButton<CustomToolbarButtonContext>,
              context: CustomToolbarButtonContext
            ) => {
              context.adaptableApi.themeApi.getCurrentTheme() == 'light'
                ? context.adaptableApi.themeApi.loadDarkTheme()
                : context.adaptableApi.themeApi.loadLightTheme();
            },
            buttonStyle: {
              tone: 'accent',
              variant: 'raised',
            },
          },
        ],
      },
    ],
    customDashboardButtons: [
      {
        label: 'Current Time',
        onClick: (
          button: AdaptableButton<DashboardButtonContext>,
          context: DashboardButtonContext
        ) => {
          context.adaptableApi.alertApi.showAlertInfo(
            'Current Time',
            new Date().toTimeString()
          );
        },
        buttonStyle: {
          tone: 'info',
          variant: 'text',
        },
      },
    ],
  },
  columnMenuOptions: {
    customColumnMenu: (context: CustomColumnMenuContext) => {
      const {
        defaultAgGridMenuStructure,
        defaultAdaptableMenuStructure,
        adaptableApi,
      } = context;

      const customDashboardMenuItem: UserColumnMenuItem = {
        menuType: 'User',
        label: adaptableApi.dashboardApi.isDashboardCollapsed()
          ? 'Expand Dashboard'
          : 'Collapse Dashboard',
        onClick: () =>
          adaptableApi.dashboardApi.isDashboardCollapsed()
            ? adaptableApi.dashboardApi.expandDashboard()
            : adaptableApi.dashboardApi.collapseDashboard(),
      };

      return [
        customDashboardMenuItem,
        '-',
        ...defaultAgGridMenuStructure,
        '-',
        ...defaultAdaptableMenuStructure,
      ];
    },
  },
  contextMenuOptions: {
    customContextMenu: (context: CustomContextMenuContext) => {
      const {
        defaultAgGridMenuStructure,
        defaultAdaptableMenuStructure,
        adaptableApi,
      } = context;

      const customDashboardMenuItem: UserContextMenuItem = {
        menuType: 'User',
        label: adaptableApi.dashboardApi.isDashboardCollapsed()
          ? 'Expand Dashboard'
          : 'Collapse Dashboard',
        onClick: () =>
          adaptableApi.dashboardApi.isDashboardCollapsed()
            ? adaptableApi.dashboardApi.expandDashboard()
            : adaptableApi.dashboardApi.collapseDashboard(),
      };

      return [
        customDashboardMenuItem,
        '-',
        ...defaultAgGridMenuStructure,
        '-',
        ...defaultAdaptableMenuStructure,
      ];
    },
  },
  initialState: {
    Dashboard: {
      Tabs: [
        {
          Name: 'Demo',
          // Surface the user-defined CustomToolbar on the default tab so
          // the demo shows off a custom toolbar without the user having
          // to click around.
          Toolbars: ['Export', 'GridFilter', 'CustomToolbar'],
        },
        {
          Name: 'Notifications',
          Toolbars: ['Alert', 'SystemStatus'],
        },
      ],
      ModuleButtons: [
        'FormatColumn',
        'DataChangeHistory',
        'CalculatedColumn',
        'Shortcut',
      ],
    },
    StatusBar: {
      StatusBars: [
        {
          Key: 'Center Panel',
          StatusBarPanels: ['Layout', 'ColumnFilter'],
        },
      ],
    },
    Theme: {CurrentTheme: 'dark'},
    Export: {
      CurrentReport: 'Popular Frameworks',
      CurrentFormat: 'JSON',
      Reports: [
        {
          ReportColumnScope: 'ScopeColumns',
          ReportRowScope: 'ExpressionRows',
          Scope: {ColumnIds: ['name', 'language']},
          Expression: '[github_stars] > 50000 ',
          Name: 'Popular Frameworks',
        },
      ],
    },
    Layout: {
      CurrentLayout: 'Sorted Layout',
      Layouts: [
        {
          TableColumns: [
            'name',
            'language',
            'github_stars',
            'rating',
            'license',
            'week_issue_change',
            'created_at',
            'github_watchers',
            'has_wiki',
            'updated_at',
            'pushed_at',
            'description',
            'open_issues_count',
            'closed_issues_count',
            'open_pr_count',
            'closed_pr_count',
            'has_projects',
            'has_pages',
          ],
          Name: 'Sorted Layout',
          ColumnSorts: [
            {
              ColumnId: 'license',
              SortOrder: 'Asc',
            },
            {
              ColumnId: 'name',
              SortOrder: 'Desc',
            },
          ],
          // Filter the grid to a focused set (~21 rows) so the column
          // formatting / styled columns are immediately legible without
          // scrolling. Bind any other expression in the Grid Filter
          // toolbar to refine further.
          GridFilter: {
            Expression: '[github_stars] > 10000',
          },
          AutoSizeColumns: true,
        },
        {
          TableColumns: [
            'name',
            'language',
            'github_stars',
            'rating',
            'license',
            'open_issues_count',
            'closed_issues_count',
            'created_at',
            'has_wiki',
            'updated_at',
            'pushed_at',
            'github_watchers',
            'description',
            'open_pr_count',
            'closed_pr_count',
            'has_projects',
            'has_pages',
            'week_issue_change',
          ],
          Name: 'Grouping Layout',
          RowGroupedColumns: ['language', 'license'],
          TableAggregationColumns: [
            {
              ColumnId: 'open_issues_count',
              AggFunc: 'sum',
            },
            {
              ColumnId: 'closed_issues_count',
              AggFunc: 'max',
            },
          ],
          AutoSizeColumns: true,
        },
      ],
    },
    // Two column-scoped format columns add live styling on the column the
    // user is looking at, paired with display formats so the raw numbers
    // read more naturally. These deliberately target columns (rather than
    // whole rows) so the table content stays the focal point.
    FormatColumn: {
      FormatColumns: [
        {
          Name: 'name-upper',
          Scope: {ColumnIds: ['name']},
          DisplayFormat: {
            Formatter: 'StringFormatter',
            Options: {Case: 'Upper', Trim: false},
          },
        },
        {
          Name: 'created-at-pattern',
          Scope: {ColumnIds: ['created_at']},
          DisplayFormat: {
            Formatter: 'DateFormatter',
            Options: {Pattern: 'yyyy/MM/dd'},
          },
        },
        {
          Name: 'github-stars-thousands',
          Scope: {ColumnIds: ['github_stars']},
          DisplayFormat: {
            Formatter: 'NumberFormatter',
            Options: {IntegerSeparator: ','},
          },
        },
        {
          Name: 'github-stars-highlight',
          Scope: {ColumnIds: ['github_stars']},
          Rule: '[github_stars] > 100000',
          Style: {
            FontWeight: 'Bold',
            ForeColor: 'var(--ab-color-accent)',
          },
        },
        {
          Name: 'week-issue-change-parens',
          Scope: {ColumnIds: ['week_issue_change']},
          DisplayFormat: {
            Formatter: 'NumberFormatter',
            Options: {Parentheses: true},
          },
        },
        {
          Name: 'week-issue-change-positive',
          Scope: {ColumnIds: ['week_issue_change']},
          Rule: '[week_issue_change] > 0',
          Style: {
            ForeColor: 'var(--ab-color-success)',
            FontWeight: 'Bold',
          },
        },
        {
          Name: 'week-issue-change-negative',
          Scope: {ColumnIds: ['week_issue_change']},
          Rule: '[week_issue_change] < 0',
          Style: {
            ForeColor: 'var(--ab-color-destructive)',
            FontWeight: 'Bold',
          },
        },
      ],
    },
    // Two styled columns: language is rendered as a coloured pill that
    // makes the stack instantly scannable; rating turns the new 1–5
    // number into a row of stars.
    StyledColumn: {
      StyledColumns: [
        {
          Name: 'Language Badge',
          ColumnId: 'language',
          BadgeStyle: {
            Badges: [
              {
                Rule: '[language] = "JavaScript"',
                PillStyle: {BackColor: '#f7df1e', ForeColor: '#1a1a1a'},
              },
              {
                Rule: '[language] = "TypeScript"',
                PillStyle: {BackColor: '#3178c6', ForeColor: 'var(--ab-color-palette-14)'},
              },
              {
                Rule: '[language] = "HTML"',
                PillStyle: {BackColor: '#e34c26', ForeColor: 'var(--ab-color-palette-14)'},
              },
            ],
          },
        },
        {
          Name: 'Rating',
          ColumnId: 'rating',
          RatingStyle: {
            Icon: 'Star',
            Max: 5,
            Size: 14,
            Gap: 2,
            AllowHalf: true,
            ShowValue: false,
          },
        },
      ],
    },
  },
};
```

**`src/onAdaptableReady.ts`**

```ts
import {AdaptableReadyInfo} from '@adaptabletools/adaptable';

export const onAdaptableReady = ({adaptableApi}: AdaptableReadyInfo) => {
  adaptableApi.toolPanelApi.openAdapTableToolPanel();
};
```

<!-- /framework -->

#### How does AdapTable work?

AdapTable extends AG Grid by providing a set of **complementary features** designed to meet advanced DataGrid use cases.

AdapTable provides full support for all AG Grid functionality including Modules, Pivoting, Master / Detail, Charts etc.

#### What can I do with AdapTable?

AdapTable ships with **over 150 features** that turn AG Grid into a fully-featured data application — without you having to write any of them.

Some of the more commonly used features include:

**Layout & Theme**

- [Layouts](https://www.adaptabletools.com/docs/handbook-layouts/index.md) — save, switch and share named grid views
- [Pivots, Groups & Aggregations](https://www.adaptabletools.com/docs/handbook-layouts-pivot/index.md) for slicing and summarising data in-place
- [Theming](https://www.adaptabletools.com/docs/handbook-theming/index.md) with built-in light and dark themes
- Custom [Dashboards](https://www.adaptabletools.com/docs/ui-dashboard/index.md), [Tool Panels](https://www.adaptabletools.com/docs/ui-tool-panel/index.md) and [Settings Panels](https://www.adaptabletools.com/docs/ui-settings-panel/index.md)

**Find & Filter**

- [Quick Search](https://www.adaptabletools.com/docs/handbook-quick-search/index.md) — type to highlight matches across the grid
- [Column Filters](https://www.adaptabletools.com/docs/handbook-column-filter/index.md) and [Grid Filters](https://www.adaptabletools.com/docs/handbook-grid-filter/index.md)
- [AdapTable Query Language](https://www.adaptabletools.com/docs/adaptable-ql-expression/index.md) — an expressive, reactive expression engine

**Style & Format**

- [Styled Columns](https://www.adaptabletools.com/docs/handbook-styled-column-overview/index.md) — Badges, Ratings, Sparklines, PercentBars, Gradients and more
- [Format Columns](https://www.adaptabletools.com/docs/handbook-column-formatting/index.md) for conditional styling and display formats
- [Flashing Cells](https://www.adaptabletools.com/docs/handbook-flashing-cell/index.md) to draw the eye to live data changes

**Extend Your Data**

- [Calculated Columns](https://www.adaptabletools.com/docs/handbook-calculated-column/index.md) — formulae, aggregates and reactive expressions
- [FreeText Columns](https://www.adaptabletools.com/docs/handbook-freetext-column/index.md) — user-owned columns whose values persist in Adaptable State
- [Notes](https://www.adaptabletools.com/docs/handbook-notes/index.md) and [Comments](https://www.adaptabletools.com/docs/handbook-comments/index.md) attached to cells

**Notify & Automate**

- [Alerts](https://www.adaptabletools.com/docs/handbook-alerting/index.md) — rule-based, scheduled, or both
- [Exports](https://www.adaptabletools.com/docs/handbook-exporting/index.md) to Excel, CSV, JSON, Clipboard and OpenFin
- [Scheduled Reports](https://www.adaptabletools.com/docs/handbook-exporting-scheduling/index.md) and [Scheduled Alerts](https://www.adaptabletools.com/docs/handbook-alerting-schedule/index.md) for time-based actions

**Collaborate & Control**

- [Team Sharing](https://www.adaptabletools.com/docs/handbook-team-sharing/index.md) — push named configurations to colleagues
- [Permissions & Entitlements](https://www.adaptabletools.com/docs/handbook-permissioning/index.md)
- [Audit Log](https://www.adaptabletools.com/docs/dev-guide-support-monitoring/index.md) for compliance and support

- See the [Features List](https://www.adaptabletools.com/docs/getting-started-features-guide/index.md) for a comprehensive list of all features in AdapTable
- Visit the [Demos page](https://www.adaptabletools.com/docs/documentation-demo-list/index.md) to see all of these features running live

## Frameworks & Environment

#### Which frameworks are supported?

AdapTable comes in 4 flavours:

| Flavour                  | Framework  | Extends                                                                       | Installation                                                            | Integration                                                           |
| ------------------------ | :--------: | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------- | --------------------------------------------------------------------- |
| **AdapTable TypeScript** | TypeScript | [AG Grid JavaScript](https://www.ag-grid.com/javascript-data-grid/)           | [Installation](https://www.adaptabletools.com/docs/getting-started-installation/index.md) | [Integration](https://www.adaptabletools.com/docs/getting-started-integration/index.md) |
| **AdapTable React**      |   React    | [AG Grid React](https://www.ag-grid.com/react-data-grid/getting-started/)     | [Installation](https://www.adaptabletools.com/docs/react-installation/index.md)           | [Integration](https://www.adaptabletools.com/docs/react-integration/index.md)           |
| **AdapTable Angular**    |  Angular   | [AG Grid Angular](https://www.ag-grid.com/angular-data-grid/getting-started/) | [Installation](https://www.adaptabletools.com/docs/angular-installation/index.md)         | [Integration](https://www.adaptabletools.com/docs/angular-integration/index.md)         |
| **AdapTable Vue**        |    Vue     | [AG Grid Vue](https://www.ag-grid.com/vue-data-grid/getting-started/)         | [Installation](https://www.adaptabletools.com/docs/vue-installation/index.md)             | [Integration](https://www.adaptabletools.com/docs/vue-integration/index.md)             |

- Use the **framework picker** in the header to read the matching product overview: [TypeScript](#what-is-adaptable-for-ag-grid), [React](#what-is-adaptable-for-ag-grid-react), [Angular](#what-is-adaptable-for-ag-grid-angular), or [Vue](#what-is-adaptable-for-ag-grid-vue)
- Learn how to build [Custom Components](https://www.adaptabletools.com/docs/ui-tutorial-building-custom-components/index.md): Toolbars, Tool Panels, Settings Panels, Menu Items & Windows etc

#### Can I run multiple AdapTables on the same page?

Yes — AdapTable is designed to support multiple instances on a single page, a common pattern in dashboards, trading blotters and multi-grid analytics applications.

Each instance is identified by its [AdaptableId](https://www.adaptabletools.com/docs/getting-started-adaptable-id/index.md), which keeps the state, configuration and Team Sharing data of each grid fully separate.

Each AdapTable instance is fully independent — they can use different themes, layouts and even different row models on the same page

#### Where does AdapTable run?

AdapTable is guaranteed to work in Chromium browsers (e.g. Chrome, Edge, Opera etc.)

We aim, but do <b>not</b> guarantee, to keep AdapTable compatible with other leading browsers like Firefox and Safari

AdapTable does <b>not</b> support Internet Explorer

AdapTable also works inside Electron and other Chromium-based frameworks.

AdapTable is fully compatible with [OpenFin](https://openfin.co/) and [interop.io](https://interop.io/) (and includes extra, bespoke functionality when running in either of those containers).

See [OpenFin Plugin](https://www.adaptabletools.com/docs/integrations-openfin/index.md) and [interop.io Plugin](https://www.adaptabletools.com/docs/integrations-interop/index.md) for details of integration with these 2 partners

## AG Grid & Data

#### Which row models are supported?

AG Grid provides 4 different 'Row Models' for different use cases, 3 of which are supported by AdapTable:

A Row Model is essentially a mechanism for loading data into AG Grid

| Name        | Description                                      | Server Based | AdapTable Support |
| ----------- | ------------------------------------------------ | :----------: | :---------------: |
| Client Side | All data loaded into grid, all actions on client |      ❌      |        ✅         |
| Server side | Supports lazy loading, including groups & aggs   |      ✅      |        ✅         |
| Viewport    | Loads data only for rows currently visible       |      ✅      |        ✅         |
| Infinite    | Loads Data as User Scrolls                       |      ✅      |        ❌         |

The Client-Side Row Model is the default - both for AdapTable and AG Grid - and is the most feature rich, allowing users to access advanced Querying and Filtering functionality straight out of the box.

All the demos in this documentation use the Client Side Row Model.

- Use the Client Side Row Model wherever possible: it requires the least additional work and is the most dependable
- Only use a different Row Model if you have proven that loading all the data up front is insufficient for your needs

AdapTable also works fully with the [Server-Side Row Model](https://www.adaptabletools.com/docs/dev-guide-row-models-server-overview/index.md) and provides additional support and assistance for external filtering and querying (since these are not available natively).

- AdapTable extends AG Grid Enterprise so does not officially support the Infinite Row Model
- But it does fully support the [Server-Side Row Model](https://www.adaptabletools.com/docs/dev-guide-row-models-server-overview/index.md) - which extends it - as well as the [ViewPort Row Model](https://www.adaptabletools.com/docs/dev-guide-row-models-viewport/index.md)

#### Does AdapTable handle live and streaming data?

Yes — AdapTable was built with high-throughput, ticking data in mind and is widely used in financial trading applications where rows update many times per second.

When data changes:

- [Alerts](https://www.adaptabletools.com/docs/handbook-alerting/index.md), [Calculated Columns](https://www.adaptabletools.com/docs/handbook-calculated-column/index.md) and [Filters](https://www.adaptabletools.com/docs/handbook-grid-filter/index.md) re-evaluate in real time
- [Flashing Cells](https://www.adaptabletools.com/docs/handbook-flashing-cell/index.md) draw attention to changes
- [Reactive Expressions](https://www.adaptabletools.com/docs/adaptable-ql-expression-observable/index.md) watch values and react as they change

AdapTable adds no measurable overhead to AG Grid; your grid remains as fast as it would be without AdapTable

#### How does AdapTable work with AG Grid?

AdapTable **extends** AG Grid.

This means AdapTable doesn't hide AG Grid in any way.

Everything available in AG Grid works fully in AdapTable, and developers still have full access to the full AG Grid Api and can code against it just as if AdapTable was not being used.

- AdapTable will typically add extra features to AG Grid functionality (e.g. for [Master Detail](https://www.adaptabletools.com/docs/handbook-master-detail/index.md) or [Row Grouping](https://www.adaptabletools.com/docs/handbook-grouping-rows/index.md))
- But sometimes (as in [Tree Data](https://www.adaptabletools.com/docs/handbook-tree-data-grid/index.md)) AdapTable merely supports what AG Grid provides

AdapTable always supports the most recent major version of AG Grid.

See the [Release Schedule](https://www.adaptabletools.com/support/release-schedule) for a table showing which AG Grid version is supported in each AdapTable version

#### Which version of AG Grid is required?

The current major version — [AdapTable 24](https://www.adaptabletools.com/support/version-240-release-note) — extends AG Grid v.36.2.0.

See the [Release Schedule](https://www.adaptabletools.com/support/release-schedule) for the full version-compatibility table

## Configuration & State

#### Does AdapTable have server components?

No, AdapTable runs purely in your client and has no server.
However it [contains many features](https://www.adaptabletools.com/docs/adaptable-server-evaluation/index.md) that help you perform searching & filtering on the server rather than client.

#### How is user configuration saved?

Every customisation a user makes — Layouts, Filters, Styled Columns, Themes, Dashboard arrangement and dozens of other settings — is collected into a single [Adaptable State](https://www.adaptabletools.com/docs/dev-guide-adaptable-state/index.md) object.

By default this state is persisted to local storage, so you find the grid exactly as you left it next time you open it.

For production deployments, AdapTable provides full hooks for [Custom State Persistence](https://www.adaptabletools.com/docs/dev-guide-adaptable-state-persistence/index.md) so you can **save state remotely** e.g. to your own database, REST endpoint or cloud store.

Provide [Initial Adaptable State](https://www.adaptabletools.com/docs/technical-reference-initial-state/index.md) to ship Layouts, Filters and Styles with your app before any user customisation is applied

#### Can users share their configuration with the team?

Yes — [Team Sharing](https://www.adaptabletools.com/docs/handbook-team-sharing/index.md) lets users publish their configurations (Layouts, Filters, Styled Columns, Alerts, etc.) for colleagues to import directly into their own grid.

Team Sharing runs in one of two modes:

- [Active](https://www.adaptabletools.com/docs/handbook-team-sharing-active/index.md) — users push and pull configurations on demand
- [Referenced](https://www.adaptabletools.com/docs/handbook-team-sharing-referenced/index.md) — shared objects are linked and update automatically when the source changes

Combine Team Sharing with [Permissions](https://www.adaptabletools.com/docs/handbook-permissioning/index.md) to allow only senior users to publish configurations to the rest of the team

#### Can we personalise AdapTable?

Yes, AdapTable is designed to be fully configurable and extensible.

Some of the many "personalisation" options include:

- [Theming](https://www.adaptabletools.com/docs/handbook-theming/index.md) AdapTable to match your colour scheme
- Providing custom [Dashboard Toolbars](https://www.adaptabletools.com/docs/ui-dashboard-custom-toolbars/index.md), [Tool Panels](https://www.adaptabletools.com/docs/ui-tool-panel-custom-tool-panel/index.md) and [Settings Panels](https://www.adaptabletools.com/docs/ui-settings-panel-custom/index.md)
- Adding an [Application Icon](https://www.adaptabletools.com/docs/ui-tutorial-creating-icon/index.md#application-icon)

## Development

#### Can AdapTable be tested?

Yes, [AdapTable is fully testable and works with all testing libraries](https://www.adaptabletools.com/docs/getting-started-testing/index.md), e.g. Jest, Playwright, Vitest etc

#### How can I inspect a live AdapTable instance?

[AdapTable DevTools](https://www.adaptabletools.com/docs/dev-guide-support-devtools/index.md) is a Chrome extension for developers and support teams.

Install it from the [Chrome Web Store](https://chromewebstore.google.com/detail/adaptable-devtools/lfdcfjfpkjnhkfednbefomhhgohnhong), open any page that is running AdapTable, and choose the **AdapTable** tab in Chrome DevTools. It needs no code change and no extra licence key.

The extension has five sections:

- **Grid Info** — versions, the current Layout, columns and logs
- **State** — snapshot, compare and migrate [Adaptable State](https://www.adaptabletools.com/docs/dev-guide-adaptable-state/index.md)
- **Performance** — record timings, Hot Paths, the [Performance Advisor](https://www.adaptabletools.com/docs/dev-guide-support-adaptable-performance/index.md#performance-advisor-rules), and memory — see [AdapTable DevTools](https://www.adaptabletools.com/docs/dev-guide-support-devtools-performance/index.md)
- **Theme Builder** — edit theme CSS variables on the Grid and export the CSS
- **DevTools Debug Info** — the DevTools store and the theme variables on the page

Scripts, tests and coding agents can read the same instance through the [DevTools in-page API](https://www.adaptabletools.com/docs/dev-guide-support-devtools-api/index.md), without the extension

#### What is AdapTable written in?

AdapTable is written in [TypeScript](https://www.typescriptlang.org/) (version 5.8.3) and uses React internally.

- You do **not need** to use TypeScript to access AdapTable, but if you do, use version 5.8.3 or higher
- That is the minimum TypeScript version required by [AG Grid 36](https://www.ag-grid.com/javascript-data-grid/compatibility/)

The **minimum** required version of React is **18**; avoid using imports / libraries which require a lower version of React

#### Which English variant is used?

AdapTable is written in British English.

- This can be changed to [American English](https://www.adaptabletools.com/docs/ui-tutorial-american-english/index.md) if required
- Full internationalisation is high on [our Road Map](https://www.adaptabletools.com/support/release-road-map) and coming very soon

#### How can I see logging messages from AdapTable?

AdapTable ensures that all critical messages are always visible in the console.
Other messages are only visible if you turn logging on.

See [Logging](https://www.adaptabletools.com/docs/dev-guide-support-logging/index.md) for full instructions on configuring AdapTable's log levels

## AI Resources

#### Does AdapTable include an AI toolkit?

Yes. The [AdapTable AI resources](https://www.adaptabletools.com/docs/getting-started-ai/index.md) gives the coding agent you already use — Cursor, Claude Code, VS Code (GitHub Copilot), OpenAI Codex and others — AdapTable's knowledge for the version installed in your project.

AdapTable provides 4 [Agent Skills](https://www.adaptabletools.com/docs/getting-started-ai-skills/index.md): `adaptable-setup`, `adaptable-dev`, `adaptable-debug`, `adaptable-upgrade`.

They run on your machine, with no API key and no extra package in the application.

They tell your agent how to add AdapTable, build or change it, read a live Grid, and plan & apply an upgrade.

There is also an [MCP Server and CLI](https://www.adaptabletools.com/docs/getting-started-ai-cli/index.md) package the Skills use to read the docs for the installed version.

- Install the Skills or nothing works: `npx skills add https://www.adaptabletools.com`
- Also install the MCP server so a Skill can call it (you do not use the MCP Server)

## Licensing & Releases

#### How is AdapTable licensed?

AdapTable is licensed on an **application** basis — a single licence covers any number of developers, end users and deployments for a given application.

Two licence types are available:

- **Single Application** — for use in one named application
- **Multiple Application** — for use in unlimited applications

See [AdapTable Licenses](https://www.adaptabletools.com/buy/buying-adaptable-licensing) for licence options, pricing and how to request a quote

AdapTable extends AG Grid Enterprise — you will also need a separate [AG Grid Enterprise licence](https://www.ag-grid.com/license-pricing.php)

#### Is AdapTable open source?

No — AdapTable is a commercial product.

You can [evaluate AdapTable](https://www.adaptabletools.com/buy/buying-adaptable-licensing) before purchasing, and our team is happy to provide trial licences for evaluation projects.

All code used in this documentation's demos is freely available to copy, fork and use in your own applications

#### How is AdapTable supported?

The best way to access AdapTable Support is by [raising a Zendesk Support Ticket](https://www.adaptabletools.com/support/adaptable-support-ticket).

See the [Support Guide](https://www.adaptabletools.com/support) for full instructions on how to raise tickets and provide examples

#### When is AdapTable updated?

AdapTable release [regular new versions](https://www.adaptabletools.com/support/release-notes) containing enhancements, new features and bug fixes.

There are a **minimum** of 6 Releases a year (2 of which are guaranteed to be major), but in reality there are many more.

## Other Products

#### Are there other AdapTable products?

AdapTable for Infinite Table will be officially released in January 2027.

This contains a very similar feature-set to AdapTable for AG Grid and extends [Infinite Table for React](https://infinite-table.com/).

## Where do I go next?

| Topic                                                                                 | Description                                                                   |
| ------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------- |
| [Installation & Integration](https://www.adaptabletools.com/docs/getting-started-installation/index.md) | Install AdapTable and wire it up to your AG Grid instance                     |
| [Key Concepts](https://www.adaptabletools.com/docs/getting-started-key-concepts/index.md)               | Understand the core building blocks used throughout AdapTable                 |
| [Demos](https://www.adaptabletools.com/docs/documentation-demo-list/index.md)                           | See AdapTable's features running live — and fork the code                     |
| [UI Guides & Tutorials](https://www.adaptabletools.com/docs/ui-tutorial-overview/index.md)              | Build custom Toolbars, Tool Panels, Settings Panels, Menu Items & Windows     |
| [Developer Tutorials](https://www.adaptabletools.com/docs/dev-guide-tutorial-overview/index.md)         | Step-by-step guides for the most common integration tasks                     |
| [AdapTable Query Language](https://www.adaptabletools.com/docs/adaptable-ql-expression/index.md)        | Master AdapTableQL — the engine behind Filters, Alerts and Calculated Columns |
| [Adaptable Options](https://www.adaptabletools.com/docs/technical-reference-adaptable-options/index.md) | Full reference for every configurable option                                  |
| [Adaptable API](https://www.adaptabletools.com/docs/technical-reference-adaptable-api/index.md)         | Drive AdapTable programmatically from your application code                   |
| [AdapTable DevTools](https://www.adaptabletools.com/docs/dev-guide-support-devtools/index.md)           | Inspect a live Grid — State, Layout, logs, performance, and theme            |
| [AI Resources](https://www.adaptabletools.com/docs/getting-started-ai/index.md)                         | Give your coding agent AdapTable's Skills, docs and checks                    |
| [Latest Release Notes](https://www.adaptabletools.com/support/release-notes)                       | What's new in the current major version                                       |

<!-- framework: react -->
### React

<!-- /framework -->

<!-- framework: angular -->
### Angular

<!-- /framework -->
<!-- framework: vue -->
### Vue

<!-- /framework -->
