Server-Side Row Model - Managing Data

Summary

  • AG Grid rows can be added, updated and deleted through AdapTable API methods when using the Server-Side Row Model
  • These functions will, in turn, invoke the relevant AG Grid functions

The Server-Side Row Model adds and updates rows using the same Grid API row management functions as when using the Client Side Row Model, namely:

AdapTable, in turn, invokes the AG Grid applyServerSideTransaction or applyServerSideTransactionAsync functions as appropriate.

Note

You can also use the setCellValue and setCellValues in Grid API to update individual cells, but this is rarely done

Updating Rows

SSRM - Updating Rows
Fork
  • This demo includes a Custom Dashboard Toolbar with 2 Buttons that call Grid API methods:
    • Update First Row - updates the first row using updateGridData
    • Update Second Row - updates Gold and Bronze columns in second row using setCallValue
  • We leverage Cell Flashing to make it easy to see which cells have changed

Adding Rows

The addGridData function in Grid API will add new Rows to the Grid while using the Server-Side Row Model.

Hint

When adding data, include the addIndex property in the DataUpdateConfig object if the new row should be visible

SSRM - Adding Rows
Fork
  • This demo includes a Custom Dashboard Toolbar with a Button which adds a new row at the top of the grid
  • We added a ROW_ADDED Observable Alert to tell the user the row was inserted