Our state of the art Gantt chart


Post by beotech »

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 ?


Post by arcady »

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).


Post by beotech »

Ok I had finally found this one for the task editor popup, but what about the assignment picker (in the assigment column) ?


Post by alex.l »

All the best,
Alex


Post by beotech »

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);
}); 

Post by fabio.mazza »

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


Post Reply