I have an ag grid where i am trying to delete a row...I am able to remove the row from data source using "splice" technique,after that i want to refresh the table.But it is showing error.This is the code which i am using to delete a row
selectedvalue={} //this holds the selected row value
rowData=[]; //this holds all the row data
onRowSelected(event) {
this.selectedvalue = event;
}
deletebtn() {
for (let i = 0; i < this.rowData.length; i++) {
if (this.selectedvalue.node.data.make === this.rowData[i].make) {
this.rowData.splice(i, 1);
this.gridOptions.api.refreshView();
}
}
}
It is showing erroe something like this--> Cannot read property 'refreshView' of undefined...How can watch the changes made in table after row delete.