I am having problems while updating a cell in ag-grid in my angular 8 application. Please find the code below:
this.columns = [
{ headerName: '', field: 'enabled', width: 30, headerCheckboxSelection: true, checkboxSelection: true },
{ headerName: 'First Name', field: 'firstName', width: 100 },
{ headerName: 'Address', field: 'address', editable: true, width: 100 },
{ headerName: 'Address1', field: 'address1', editable: true, width: 70 }
];
this.rows = [
{"first name1", "address", "address1"},
{"first name2", "address", "address1"}
];
The above code allows me to update address and address1 fields, but when I try to get row data it is using the old values. Please find my code below to get data:
this.agGrid.api.forEachNode((node) => {
console.log('-- the node data --', node.data);
});
What changes do I need to implement to get updated data from the ag-grid.
Thanks
getRowNodeIdcellEditingStoppedevents? share your entire code OR reproduce your issue on plunk. - ParitoshforEachNode()method. Share your component files (both TS and HTML) in which ag-grid table is displayed. If possible create a minimal reproducible app in Stackblitz. - Shravan