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 GridsetCellValues- callssetCellValuein a loop
Many Modules in AdapTable react to this function being invoked, including:
- causing Cell or Row Flashing if configured
- triggering any Data Change Alerts and apply any Validation Alerts
- firing the Cell Changed Event
- populating the Data Change History Monitor with details of the edit
Note
These functions are used by AdapTable for cell edits triggered by Smart Edit, Bulk Update, Shortcuts or Plus Minus
setCellValue
voidUpdate a Single Cell in AG Grid
Setting Cell Values
- This demo provides examples of updating individual Cell Values via the
setCellValuefunction inGrid API(using 3 Custom Toolbar Buttons):- First button updates
Languagein first row to Python - Second button increments the
Github Starsvalue in the second row - Third button changes all rows that have a License of 'Other' to 'Unknown License' (using the
setCellValuesfunction)
- First button updates
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