I use ag-grid to display a list of users. If I edit user data, then I want to click the refresh button in the grid to edit the corresponding user data.
This is the coloumn header in ag_grid
{ headerName: 'Update', field: "update", width: 80, cellRenderer:this.updateRenderFunction}
I use cell rendering
updateRenderFunction(params){ var eSpan = document.createElement('button'); eSpan.innerHTML = "Update"; var data = params.node.data; eSpan.addEventListener('click',()=>{ //here i want to call service }) return eSpan; }
source share