Handling Grid Data

Summary

  • AdapTable provides a number of methods in Grid API which manage AG Grid data at runtime, including to:
    • Load Grid Data
    • Add / Update / Delete rows (either individually or in a single transaction)
    • Set a single Grid Cell value
    • Provide delayed Grid Data
    • Transpose Grid Data

The Grid API section of Adaptable API contains many functions to access AG Grid at run-time.

These include a series of data-management functions which can be grouped into 6 sets:

Important

  • We strongly recommend using these functions to update AG Grid, rather than the AG Grid API directly
  • Each function ultimately calls an AG Grid function but first also performs important checks and other key actions

Most of these Grid API functions will do 2 things (that vary based on the use case):

  • update AG Grid using the relevant AG Grid api function
  • trigger an AdapTable Event - either Row Changed (with a Trigger) or Cell Changed

The full details are as follows:

Use CaseAdapTable FunctionAG Grid Function InvokedAdapTable EventTrigger
Loading Grid DataloadGridDatasetRowDataRow ChangedLoad
Adding RowsaddGridDataapplyTransaction addRow ChangedAdd
Updating RowsupdateGridDataapplyTransaction updateRow ChangedUpdate
Deleting RowsdeleteGridDataapplyTransaction removeRow ChangedDelete
Setting Cell ValuessetCellValuerowNode.setDataValueCell Changed

Note

The functions that invoke applyTransaction might call applyTransactionAsync based on the config they are given