Hello,
How we can disable changing/deleting of some level?
Is there some kind of "property" we can set on level to disable its removing/changing?
For example, we want to disable editing on level 1 and 1.1
Thanks,
Vitalie
To do so, you can use the taskMenuBeforeShow
event.
Please check docs: https://bryntum.com/docs/gantt/api/Gantt/feature/TaskMenu#event-taskMenuBeforeShow
Here is an example of how you can achieve that :
taskMenuBeforeShow({ taskRecord, items }) {
const wbsValue = taskRecord.wbsValue.value;
if (wbsValue === "1" || wbsValue === "1.1") {
// disable delete menu item
items.deleteTask.disabled = true;
}
}