I have a table with 3 columns:
[location] [dateStart] [dateEnd]
I want the user select a location and after that select dateStart and dateEnd. For that I want disable the cells of dateStart and dateEnd.
onCellValueChanged: (params) => {
if (this.locationIsMandatory) {
if (params.newValue) {
params.columnApi.getColumn('dateStart').getColDef().editable = true;
params.columnApi.getColumn('dateEnd').getColDef().editable = true;
}
}
This code blocks the columns but in all the rows of the table and I just want it in the row what the user is modifying.
Regards :)
Set the editable column definition into a function which returns
trueorfalsebased on your need.Note: you can get the row data and column data from
params