Updating Grid Cells

Summary

  • AdapTable provides 2 methods in Grid API used to set specific cell values

The Grid API section of Adaptable API contains 2 functions for when just particular cells, rather than a whole row, needs to be updated.

Find Out More

  • See Updating Grid Rows for instructions on how to update entire rows
  • See the Editing Data section for details on the many AdapTable Modules that support data entry and editing
  • setCellValue - updates a single Cell in the Grid
  • setCellValues - calls setCellValue in a loop

Many Modules in AdapTable react to this function being invoked, including:

Note

These functions are used by AdapTable for cell edits triggered by Smart Edit, Bulk Update, Shortcuts or Plus Minus

setCellValue

void
Update a Single Cell in AG Grid
Setting Cell Values
Fork
  • This demo provides examples of updating individual Cell Values via the setCellValue function in Grid API (using 3 Custom Toolbar Buttons):
    • First button updates Language in first row to Python
    • Second button increments the Github Stars value in the second row
    • Third button changes all rows that have a License of 'Other' to 'Unknown License' (using the setCellValues function)
Try It Out
  • Click the 3 buttons in turn to see the cell changes made (we turned on Cell Flashing to make it easier to see)
  • Open the Data Change History Monitor to see a record of the changes