I'm trying to dynamically update the editability of a particular ag grid cell in the selected row based on an unsaved change to another cell in the same row. However, I'm having trouble accessing the new, unsaved value. I assumed the new value would be a property of the event but it seems to retain the old value. I basically need the disabled field to become editable if the value in the cell next to it is changed to "Yes", but not saved yet. I have been trying to do it with something like the following:
onRowClicked(event) {
if ((this.gridApi.getColumnDef("contract.isNational") === "No" || this.gridApi.getColumnDef("contract.isNational") === "")
&& event.data.contract.isNational === "Yes") {
this.gridApi.getColumnDef("contract.nationalContractType").editable = true;
}
console.log(event.data.contract.isNational);
}
Thanks!