I am new to AG Grid. I am currently having issues with updating a single cell. I am able to update but the old value is still retained in UI when the grid loads for the first time I have a cell render selector
Based on this When I load the AG grid for the first time it's fine. But if I do change
const r= gridOptions.api.getRowNode(params.data.id);
var test= "InProcess";
r.setDataValue('IsIndexed', test);
I should get only the image but I see that it gets appended to the existing
In oninit I used something like this
if (params.value === 'ABC') {
imgForDLHub = '../Im1/123.png';
}
else if (params.value === '567') {
imgForDLHub = '../Im34/546.png';
}
Once you have changed the data, you need to call ag-grid's function to refresh the table cells:
api.refreshCells()
This is just a function that takes in optional params and performs change detection on all cells, refreshing cells where required.
Check out these sections of the docs for more information: