Editing Technical Reference

Summary

  • Edit Options contains a number of useful editing-related options
  • Cell Changed Event published by AdapTable whenever the contents of the Cell Changes
    • Can be the result of a User edit in AG Grid or Ticking data updates
    • The event provides full details of the change and where in AG Grid it happened

Edit Options

The Edit Options section of Adaptable Options contains these properties:

PropertyDescriptionDefault
customEditColumnValuesList of Column values to display when Editing (i.e. in Edit Lookups, Bulk Update)
displayServerValidationMessagesWhether to display message after Server Validation runstrue
isCellEditableFunction which checks if a given Grid Cell is editable
showSelectCellEditorColumns that will display a Select dropdown when editing
smartEditCustomOperationsCustom Operations to use in Smart Edit
validateOnServerFunction to validate AdapTable data edits remotely

Cell Changed Event

The Cell Changed Event fires whenever the contents of any cell changes in AG Grid.

This can be the result of a user cell edit or of ticking data.

CellChangedInfo

The event comprises the CellChangedInfo object:

PropertyDescription
cellDataChangeObject providing full information of the cell (and column and row) that changed
adaptableContextCustom application Context provided in AdaptableOptions.adaptableContext

This provides a single cellChange property of type CellDataChangedInfo defined as follows:

PropertyDescription
changedAtTimestamp of change occurrence (in milliseconds)
columnColumn in which cell is situated
newValueNew value for the cell
oldValueValue in the Cell before the edit
primaryKeyValuePrimary Key Column's value for the row where edited cell is situated
rowDataData in the Row
rowNodeAG Grid RowNode that contains the cell
triggerWhat triggered the change - user, background change or a reverted change?

Event Subscription

Subscribing to the Event is done the same way as with all Adaptable Events:

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