# Action Columns

Canonical page: https://www.adaptabletools.com/docs/handbook-action-column

- AdapTable allows developers to define Action Columns
- These are special columns that host interactive Controls on each row
- There are 8 different types of controls available
- Multiple Controls can be placed in one Column
- Controls are defined at design-time, and rendered by AdapTable at run-time

Action Columns are special columns that display interactive Controls used for row-based actions.

They are defined by developers at **design-time** and rendered by AdapTable at **run-time**.

Unlike other AdapTable features, Action Columns are only defined in AdapTable Options and never in Initial State

There are **8** Control types which can be hosted inside an Action Column:

| Control                                                              | `type`    | Description                                                                                                |
| -------------------------------------------------------------------- | --------- | ---------------------------------------------------------------------------------------------------------- |
| [Button](https://www.adaptabletools.com/docs/handbook-action-column-button/index.md)   | `button`  | Clickable button with an `onClick` handler                                                                 |
| [Toggle](https://www.adaptabletools.com/docs/handbook-action-column-toggle/index.md)   | `toggle`  | Switch, checkbox or toggle-button bound to a boolean                                                       |
| [Link](https://www.adaptabletools.com/docs/handbook-action-column-link/index.md)       | `link`    | Hyperlink (`href`, `mailto:`, drill-through)                                                               |
| [Select](https://www.adaptabletools.com/docs/handbook-action-column-select/index.md)   | `select`  | Dropdown that writes a chosen value                                                                        |
| [Command](https://www.adaptabletools.com/docs/handbook-action-column-command/index.md) | `command` | Built-in `create`, `clone`, `edit` or `delete` Row Form commands                                           |
| [Menu](https://www.adaptabletools.com/docs/handbook-action-column-menu/index.md)       | `menu`    | Dropdown or split menu that contains other Controls                                                        |
| [Form](https://www.adaptabletools.com/docs/handbook-action-column-form/index.md)       | `form`    | Opens an [Adaptable Form](https://www.adaptabletools.com/docs/ui-tutorial-configuring-adaptable-forms/index.md) in a popover |
| [Custom](https://www.adaptabletools.com/docs/handbook-action-column-custom/index.md)   | `custom`  | Bespoke React / Angular / Vue / HTML content                                                               |

## Topics in this Section

| Topic                                                                                       | Description                                                             |
| ------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------- |
| [Action Column Buttons](https://www.adaptabletools.com/docs/handbook-action-column-button/index.md)           | Clickable buttons with `onClick`, confirm, and async busy state         |
| [Action Column Toggles](https://www.adaptabletools.com/docs/handbook-action-column-toggle/index.md)           | Switch, checkbox or toggle-button bound to a row field                  |
| [Action Column Links](https://www.adaptabletools.com/docs/handbook-action-column-link/index.md)               | Hyperlinks built from row data (`href`, `target`, visibility)           |
| [Action Column Selects](https://www.adaptabletools.com/docs/handbook-action-column-select/index.md)           | Dropdowns that write a chosen value back to the row                     |
| [Action Column Commands](https://www.adaptabletools.com/docs/handbook-action-column-command/index.md)         | Built-in create, clone, edit and delete Row Form commands               |
| [Action Column Menus](https://www.adaptabletools.com/docs/handbook-action-column-menu/index.md)               | Dropdown or split menus containing other Controls                       |
| [Action Column Forms](https://www.adaptabletools.com/docs/handbook-action-column-form/index.md)               | Adaptable Form in a popover, seeded from the row                        |
| [Custom Action Columns](https://www.adaptabletools.com/docs/handbook-action-column-custom/index.md)           | React, Angular, Vue or HTML content via `render` / `frameworkComponent` |
| [Configuring Action Columns](https://www.adaptabletools.com/docs/handbook-action-column-configuring/index.md) | Width, overflow, `rowScope`, and AG Grid Column Definitions             |
| [Action Column Options](https://www.adaptabletools.com/docs/technical-reference-action-column/index.md)       | Options, Control types, and API reference                               |

Each Control type page includes **DevSteps** with a full `actionColumnOptions` example. Action Columns are defined only in Options — not in Initial State.

- Action Columns — like [Calculated Columns](https://www.adaptabletools.com/docs/handbook-calculated-column/index.md) and [Free Text Columns](https://www.adaptabletools.com/docs/handbook-freetext-column/index.md) — are not "normal" data columns
- They don't exist in the underlying AG Grid data source and typically don't have an AG Grid ColDef (though they can)
- Instead, they are **created dynamically** by AdapTable each time the Application runs
- By contrast [Styled Columns](https://www.adaptabletools.com/docs/handbook-styled-column-overview/index.md) are "normal" data columns, albeit ones which AdapTable specially renders

Once created, Action Columns can be used and managed like any other Column in AG Grid and AdapTable.

- Action Columns are configured entirely at design-time; they can't be created, edited or deleted in AdapTable's UI 
- However, they can be moved, hidden, or added to a [Layout](https://www.adaptabletools.com/docs/handbook-layouts/index.md)

**Example: Action Columns**

The 8 Action Column Control types

- This demo defines one Action Column for each of the 8 Control types:
  - **Stars** — `button` increments `Github Stars`
  - **Wiki** — `toggle` (switch) bound to `Has Wiki`
  - **Repo** — `link` opens the GitHub page
  - **License** — `select` writes a new license
  - **Edit** — `command` opens the Edit Row Form
  - **More** — `menu` with increment, clone and delete
  - **Notes** — `form` popover to edit the description
  - **Badge** — `custom` chip from the language

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  [template]
  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 {
  ActionColumnContext,
  AdaptableOptions,
  CellUpdateRequest,
} from '@adaptabletools/adaptable';
import {WebFramework} from './rowData';

const setNumericCell = (
  context: ActionColumnContext<WebFramework>,
  columnId: keyof WebFramework,
  newValue: number
) => {
  const cellUpdateRequest: CellUpdateRequest = {
    columnId: String(columnId),
    newValue,
    primaryKeyValue: context.primaryKeyValue,
    rowNode: context.rowNode,
  };
  context.adaptableApi.gridApi.setCellValue(cellUpdateRequest);
};

export const adaptableOptions: AdaptableOptions<WebFramework> = {
  primaryKey: 'id',
  adaptableId: 'Action Columns Showcase',
  actionColumnOptions: {
    actionColumns: [
      {
        columnId: 'stars_action',
        friendlyName: 'Stars',
        settings: {width: 90, suppressMenu: true},
        controls: [
          {
            type: 'button',
            label: '+1',
            tooltip: 'Add a GitHub star',
            style: {variant: 'outlined', tone: 'accent'},
            onClick: context => {
              setNumericCell(
                context,
                'github_stars',
                (context.data?.github_stars ?? 0) + 1
              );
            },
          },
        ],
      },
      {
        columnId: 'wiki_action',
        friendlyName: 'Wiki',
        settings: {width: 90, suppressMenu: true},
        controls: [
          {
            type: 'toggle',
            variant: 'switch',
            value: context => Boolean(context.data?.has_wiki),
            onChange: (checked, context) => {
              context.rowNode?.setDataValue('has_wiki', checked);
            },
          },
        ],
      },
      {
        columnId: 'repo_action',
        friendlyName: 'Repo',
        settings: {width: 90, suppressMenu: true},
        controls: [
          {
            type: 'link',
            label: 'GitHub',
            tooltip: 'Open the repository',
            href: context => context.data?.html_url ?? '',
            hidden: context => !context.data?.html_url,
            target: '_blank',
          },
        ],
      },
      {
        columnId: 'license_action',
        friendlyName: 'License',
        settings: {width: 150, suppressMenu: true},
        controls: [
          {
            type: 'select',
            placeholder: 'License',
            value: context => context.data?.license ?? '',
            options: [
              {label: 'MIT License', value: 'MIT License'},
              {label: 'BSD 3-Clause', value: 'BSD 3-Clause'},
              {label: 'Other', value: 'Other'},
            ],
            onChange: (value, context) => {
              context.rowNode?.setDataValue('license', value);
            },
          },
        ],
      },
      {
        columnId: 'edit_action',
        friendlyName: 'Edit',
        settings: {width: 80, suppressMenu: true},
        controls: [
          {
            type: 'command',
            command: 'edit',
            label: 'Edit',
          },
        ],
      },
      {
        columnId: 'more_action',
        friendlyName: 'More',
        settings: {width: 100, suppressMenu: true},
        controls: [
          {
            type: 'menu',
            label: 'More',
            variant: 'dropdown',
            controls: [
              {
                type: 'button',
                label: 'Add star',
                icon: {name: 'plus'},
                onClick: context => {
                  setNumericCell(
                    context,
                    'github_stars',
                    (context.data?.github_stars ?? 0) + 1
                  );
                },
              },
              {
                type: 'command',
                command: 'clone',
                label: 'Clone row',
              },
              {
                type: 'command',
                command: 'delete',
                label: 'Delete row',
                confirm: {
                  title: 'Delete row?',
                  message: 'This will remove the row from the grid.',
                  confirmLabel: 'Delete',
                  tone: 'danger',
                },
              },
            ],
          },
        ],
      },
      {
        columnId: 'notes_action',
        friendlyName: 'Notes',
        settings: {width: 90, suppressMenu: true},
        controls: [
          {
            type: 'form',
            label: 'Notes',
            getInitialData: context => ({
              description: context.data?.description ?? '',
            }),
            form: {
              title: 'Edit description',
              fields: [
                {
                  name: 'description',
                  label: 'Description',
                  fieldType: 'text',
                },
              ],
              buttons: [
                {
                  label: 'Save',
                  buttonStyle: {variant: 'raised', tone: 'success'},
                  onClick: (_button, context: any) => {
                    context.rowNode?.setDataValue(
                      'description',
                      context.formData.description
                    );
                  },
                },
              ],
            },
          },
        ],
      },
      {
        columnId: 'badge_action',
        friendlyName: 'Badge',
        settings: {width: 110, suppressMenu: true},
        controls: [
          {
            type: 'custom',
            render: context => {
              const language = context.data?.language || 'n/a';
              return language;
            },
            renderHTML: () => '<span>custom</span>',
          },
        ],
      },
    ],
  },
  rowFormOptions: {
    autoHandle: true,
    disableInlineEditing: true,
    setPrimaryKeyValue: context => ({
      ...context.rowData,
      id: context.adaptableApi.gridApi.getRowCount() + 1,
    }),
  },
  initialState: {
    Theme: {CurrentTheme: 'dark'},
    Layout: {
      CurrentLayout: 'Standard Layout',
      Layouts: [
        {
          Name: 'Standard Layout',
          TableColumns: [
            'name',
            'language',
            'github_stars',
            'stars_action',
            'has_wiki',
            'wiki_action',
            'license',
            'license_action',
            'repo_action',
            'edit_action',
            'more_action',
            'notes_action',
            'badge_action',
          ],
          AutoSizeColumns: true,
        },
      ],
    },
  },
};
```

## Defining an Action Column

Each Action Column (of type [`ActionColumn`](https://www.adaptabletools.com/docs/reference/actioncolumn.md)) is defined in the `actionColumns` property of [Action Column Options](https://www.adaptabletools.com/docs/technical-reference-action-column/index.md).

The required pieces are:

- `columnId` — how the Column is referenced in Layouts and code
- `friendlyName` — header caption (falls back to `columnId`)
- `controls` — an array of [`ActionColumnControl`](https://www.adaptabletools.com/docs/reference/actioncolumncontrol.md) objects, each with a `type`

```ts
actionColumnOptions: {
  actionColumns: [
    {
      columnId: 'actions',
      friendlyName: 'Actions',
      controls: [
        {
          type: 'button',
          label: 'Run',
          onClick: (context) => {
            // ...
          },
        },
      ],
    },
  ],
},
```

### How Action Columns are Created, and Work, in AdapTable

Each time the application starts, AdapTable retrieves Action Column definitions from [Action Column Options](https://www.adaptabletools.com/docs/technical-reference-action-column/index.md).

For each definition, AdapTable will:

1. Create an [Adaptable Column](https://www.adaptabletools.com/docs/dev-guide-columns-adaptable-column/index.md)
2. Create an equivalent [AG Grid column](https://www.ag-grid.com/javascript-data-grid/column-definitions/)

- For advanced use cases the Action Column can also be listed in AG Grid Column Definitions
- Wire it up by using a [Specialised Column Type](https://www.adaptabletools.com/docs/dev-guide-columns-column-types/index.md#special-columns) of `actionColumn`
- See [Configuring Action Columns](https://www.adaptabletools.com/docs/handbook-action-column-configuring/index.md)

<b>Shared Control properties</b>

Every Control extends [`BaseControl`](https://www.adaptabletools.com/docs/reference/basecontrol.md). These properties can be a static value or a function of [`ActionColumnContext`](https://www.adaptabletools.com/docs/reference/actioncolumncontext.md):

| Property       | Purpose                                                                         |
| -------------- | ------------------------------------------------------------------------------- |
| `label`        | Text shown on the Control                                                       |
| `icon`         | Optional [Adaptable Icon](https://www.adaptabletools.com/docs/ui-tutorial-creating-icon/index.md) |
| `iconPosition` | `'start'` (default) or `'end'`                                                  |
| `tooltip`      | Hover text                                                                      |
| `style`        | [`ButtonStyle`](https://www.adaptabletools.com/docs/reference/buttonstyle.md) (variant, tone, etc.)          |
| `hidden`       | Hide the Control for some rows                                                  |
| `disabled`     | Disable the Control for some rows                                               |
| `id`           | Stable identifier for tests / targeting                                         |

```ts
{
  type: 'button',
  label: (context) =>
    context.data.language === 'JavaScript' ? 'Add Star' : 'Remove Star',
  hidden: (context) => context.data.name === 'stencil',
  disabled: (context) => context.data.github_watchers < 200,
  onClick: (context) => {
    // ...
  },
}
```

Handler functions receive **only** the Context (not a separate button argument).

## Multiple Controls

A Column can contain as many Controls as required.

They render in the order that they are provided.

- When they do not all fit, set `settings.overflow` to `'menu'` — overflowing Controls collapse into a "⋯" menu.
- See [Configuring Action Columns](https://www.adaptabletools.com/docs/handbook-action-column-configuring/index.md) for width, overflow, `rowScope`, and AG Grid Column Definitions.

## Leveraging Action Columns

AdapTable creates Action Columns automatically in 2 additional use cases:

- when using [FDC3](https://www.adaptabletools.com/docs/handbook-fdc3/index.md) to raise Intents and broadcast Contexts
- if adding [Action Buttons](https://www.adaptabletools.com/docs/handbook-monitoring-data-change-history-buttons/index.md) to the Data Change History Monitor

<RelatedBlogCard path="/blog/2026-11-04-action-columns-in-adaptable" />

### FAQ

**Can we edit Action Columns at runtime?**
No. Action Columns can only be provided and configured at design time.

**Can we refer to the Action Column in AG Grid Column Definitions (e.g. to put it in a Column Group)?**
Yes. Match `colId` to the Action Column `columnId` and set a [Column Type](https://www.adaptabletools.com/docs/dev-guide-columns-column-types/index.md) of `actionColumn`.

**Can I mix Control types in one Column?**
Yes. An Action Column's `controls` array can contain any mix of the 8 types, including a `menu` that itself contains other Controls.
