Hi,
After we assign resources via the assignment picker or the task editor and click on Save button, what is the best way to intercept the save event to do some custom logic before it is actually saved ?
Listen to this event https://www.bryntum.com/docs/gantt/#Gantt/feature/TaskEdit#event-beforeEventSave and return false
from the event listener function to prevent saving.
The event is triggered on the Gantt instance (docs mention Scheduler Pro instance but that's just because its written for the scheduler pro class that was subclassed in the gantt).
Hi beotech,
For grid cell editor please check https://bryntum.com/docs/gantt/#Grid/feature/CellEdit#event-beforeFinishCellEdit
All the best,
Alex
Hi,
This event does not seem to be triggered for the assignment column.
The following code added to one of your demo examples only shows the 'beforeCellEditStart' in the console :
gantt.on('beforeCellEditStart', ({ editorContext }) => {
console.log('beforeCellEditStart: ' + editorContext.column.field);
});
gantt.on('beforeFinishCellEdit', ({ editorContext }) => {
console.log('beforeFinishCellEdit: ' + editorContext.column.field);
});
gantt.on('finishCellEdit', ({ editorContext }) => {
console.log('finishCellEdit: ' + editorContext.column.field);
});
Hi beotech,
Thank you for your report, here is the issue created about the problem, you can track it with the link: https://github.com/bryntum/support/issues/1842
Best regards,
Fabio