Action Columns
Summary
- 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.
Note
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 | button | Clickable button with an onClick handler |
| Toggle | toggle | Switch, checkbox or toggle-button bound to a boolean |
| Link | link | Hyperlink (href, mailto:, drill-through) |
| Select | select | Dropdown that writes a chosen value |
| Command | command | Built-in create, clone, edit or delete Row Form commands |
| Menu | menu | Dropdown or split menu that contains other Controls |
| Form | form | Opens an Adaptable Form in a popover |
| Custom | custom | Bespoke React / Angular / Vue / HTML content |
Topics in this Section
| Topic | Description |
|---|---|
| Action Column Buttons | Clickable buttons with onClick, confirm, and async busy state |
| Action Column Toggles | Switch, checkbox or toggle-button bound to a row field |
| Action Column Links | Hyperlinks built from row data (href, target, visibility) |
| Action Column Selects | Dropdowns that write a chosen value back to the row |
| Action Column Commands | Built-in create, clone, edit and delete Row Form commands |
| Action Column Menus | Dropdown or split menus containing other Controls |
| Action Column Forms | Adaptable Form in a popover, seeded from the row |
| Custom Action Columns | React, Angular, Vue or HTML content via render / frameworkComponent |
| Configuring Action Columns | Width, overflow, rowScope, and AG Grid Column Definitions |
| Action Column Options | Options, Control types, and API reference |
Hint
Each Control type page includes DevSteps with a full actionColumnOptions example. Action Columns are defined only in Options — not in Initial State.
Note
- Action Columns — like Calculated Columns and Free Text Columns — 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 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.
Caution
- 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
- This demo defines one Action Column for each of the 8 Control types:
- Stars —
buttonincrementsGithub Stars - Wiki —
toggle(switch) bound toHas Wiki - Repo —
linkopens the GitHub page - License —
selectwrites a new license - Edit —
commandopens the Edit Row Form - More —
menuwith increment, clone and delete - Notes —
formpopover to edit the description - Badge —
customchip from the language
- Stars —
Defining an Action Column
Each Action Column (of type ActionColumn) is defined in the actionColumns property of Action Column Options.
The required pieces are:
columnId— how the Column is referenced in Layouts and codefriendlyName— header caption (falls back tocolumnId)controls— an array ofActionColumnControlobjects, each with atype
actionColumnOptions: {
actionColumns: [
{
columnId: 'actions',
friendlyName: 'Actions',
controls: [
{
type: 'button',
label: 'Run',
onClick: (context) => {
// ...
},
},
],
},
],
},Deep Dive
How Action Columns are Created, and Work, in AdapTable
Multiple Controls
A Column can contain as many Controls as required.
They render in the order that they are provided.
Hint
- When they do not all fit, set
settings.overflowto'menu'— overflowing Controls collapse into a "⋯" menu. - See Configuring Action Columns 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 to raise Intents and broadcast Contexts
- if adding Action Buttons to the Data Change History Monitor
Action Columns in AdapTable
Put buttons, toggles, links or custom content on AG Grid rows — 8 Control types, configured in a few lines
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 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.