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

Columns which contain an AdapTable Button - used for performing Actions

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 Layouts
  • FriendlyName - 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 ColId in the AG Grid ColDef and ColumnId in the Action Column definition are the same value

Find Out More

See Adding Special Column Types for more details and a demo

Action Columns: Defining in AG Grid
Fork
  • 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 actionColumn which is what allowed AdapTable to wire everything together

Expand to see the AG Grid ColDef

Try It Out

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 Button object, which has a hidden property
  • This enables a much more granular approach, i.e. to hide an Action Column button on a row-by-row basis
Action Columns: Grouped Rows
Fork
  • In this example we define an Action Column with the rowScope property set to exclude Grouped Rows and Summary Rows
  • Accordingly we only see the Add Star Action Column in actual Data Rows

Expand to see the Action Column Definition