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:
| Property | Description | Default |
|---|---|---|
| customEditColumnValues | List of Column values to display when Editing (i.e. in Edit Lookups, Bulk Update) | |
| displayServerValidationMessages | Whether to display message after Server Validation runs | true |
| isCellEditable | Function which checks if a given Grid Cell is editable | |
| showSelectCellEditor | Columns that will display a Select dropdown when editing | |
| smartEditCustomOperations | Custom Operations to use in Smart Edit | |
| validateOnServer | Function 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:
| Property | Description |
|---|---|
| cellDataChange | Object providing full information of the cell (and column and row) that changed |
| adaptableContext | Custom application Context provided in AdaptableOptions.adaptableContext |
This provides a single cellChange property of type CellDataChangedInfo defined as follows:
| Property | Description |
|---|---|
| changedAt | Timestamp of change occurrence (in milliseconds) |
| column | Column in which cell is situated |
| newValue | New value for the cell |
| oldValue | Value in the Cell before the edit |
| primaryKeyValue | Primary Key Column's value for the row where edited cell is situated |
| rowData | Data in the Row |
| rowNode | AG Grid RowNode that contains the cell |
| trigger | What 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
});