AdapTable Events

AdapTable fires a number of Events, which provide information about everything that is happening inside AdapTable and the underlying vendor grid.

List of Events

The Events which are currently fired by AdapTable are:

EventWhen Fired
AdaptableReadyAdaptable is initialised and ready for use
AdaptableStateChangedSomething was changed in Adaptable State
AlertFiredAn alert is triggered in Adaptable
CellChangedUser makes an edit in a Grid Cell or a ticking data change is made
CheckboxColumnClickedA Checkbox has been clicked (boolean column)
CustomToolbarConfiguredThe 'configure' button is clicked in a Custom Toolbar
DashboardChangedDashboard State changed (useful for rendering Custom toolbars)
FlashingAlertFiredA Flashing Alert was fired
GridDataChangedRows have been added, updated or deleted in the Grid
LayoutChangedThe Layout section of Adaptable State changes
LiveDataChangedSomething happens related to the 'live reports' that AdapTable offers
SearchChangedState has changed in a Search-related Module (e.g. Query, Filters etc)
SelectionChangedUser changes the Cell or Rows selection
SystemStatusMessageDisplayedA new System Status Message has been displayed
TeamSharedEntityChangedAn Active Shared Entity in Team Sharing has changed
ThemeChangedThe Theme in Adaptable has changed

Subscribing to Events

Users subscribe to these Events, and respond as appropriate, via the on method of the Event Api.

This takes 2 parameters:

  • eventName - name of event being subscribed to
  • callback - object containing relevant information, of type xxxInfo

For example the definition of the LayoutChangedEvent is:

on(
eventName: 'LayoutChanged',
callback: (eventInfo: LayoutChangedInfo) => void
): () => void;

And to subscribe to the event you could do:

api.eventApi.on('LayoutChanged', (eventInfo: LayoutChangedInfo) => {
// do something with the info
});

Unsubscribing from Events

There is a parallel unsubsciption off method in the Event Api.

This takes the same form as the on method, so the definition for the LayoutChangedEvent is simply:

off(
eventName: 'LayoutChanged',
callback: (eventInfo: LayoutChangedInfo) => void
): () => void;

Demos

The following demos show aspects of Adaptable Events