Configuring Action Columns
Summary
- Action Columns are defined at Design Time
- Each Action Column Button can be configured to meet precise requirements
Defining Action Columns
Action Columns are provided in the actionColumns property of Action Column Options.
actionColumns
Developers define 3 main sets of information when providing an Action Column Definition:
Identifiers
Each Action Column has 2 forms of identification:
Id- used internally when referencing the Column in other Objects like LayoutsFriendlyName- used in the UI, e.g. in Wizards
Button
The button(s) is at the heart of the Action Column.
It is an Adaptable Button which means that it can be styled and configured to user requirements.
Deep Dive
The Action Column Button
Settings
The behaviour of each Action Column can be configured also. e.g. width, movable, resizable etc.
Deep Dive
Action Column Settings
Putting it Together
Developer Guide
Defining an Action Column
AG Grid Column Definitions
In most cases Action Columns are not provided in the ColDefs property in AG Grid GridOptions.
Instead the Action Columns provided in Action Column Options suffice for AdapTable to be able to create the associated AG Grid column automatically.
However sometimes a developer might want to add an AG Grid element to the Action Column.
For instance a tooltip might be needed, or there might be a requirement to put the Action Column inside a Column Group (which is an AG Grid feature).
This is possible: a column can be provided in AG Grid ColDefs but by specifying a Column Type of actionColumn, AdapTable will automatically wire it up with an associated Action Column definition.
Hint
- Set the Column Type to be
actionColumn - Make sure
ColIdin the AG Grid ColDef andColumnIdin the Action Column definition are the same value
Find Out More
See Adding Special Column Types for more details and a demo
- This demo contains an AG Grid Column Group -
Actions - The group contains 2 Action Columns for adding and deleting issues
- Both the Column Group and the 2 containing Columns were defined in AG Grid Column Defs
- The 2 columns in the Group were given AG Grid Header and Cell ToolTips
- They were also given a type of
actionColumnwhich is what allowed AdapTable to wire everything together
Expand to see the AG Grid ColDef
Hover over a Button in an Action Column and see the Tooltip which AG Grid provides
Grouped & Summary Rows
By default Action Columns will appear in every row in AG Grid.
If this behaviour is unwanted, the rowScope property can be used to 3 types of Rows (all visible by default):
- Grouped Rows
- Summary Rows
- Data Rows
Hint
- The Action Column contains a
Buttonobject, which has ahiddenproperty - This enables a much more granular approach, i.e. to hide an Action Column button on a row-by-row basis
- In this example we define an Action Column with the
rowScopeproperty set to exclude Grouped Rows and Summary Rows - Accordingly we only see the
Add StarAction Column in actual Data Rows