Our state of the art Gantt chart


Post by johanbrodin »

Hi,

We want to receive events when cell names have been modified. Below code snip-it works fine if you double press on a cell name and edit. However which event should we listen to if you right click on a task and select edit in the dropdown?

Looking through your documentation we could not find a matching one. Also a small comment, independent on how you change name it feels most user friendly to have one event.

this.gantt.on('finishCellEdit', (event: any) => {
    	var task = this.ganttComponent.instance.project.taskStore.getById(event.editorContext._id);
      	return true;
});
   
this.gantt.on('beforeComplete', (event: any) => { //we tried this as well but did not trigger });

Post by alex.l »

Hi johanbrodin,

The event you used is triggered by UI level feature, when cellEdit feature used. There is another feature https://bryntum.com/products/gantt/docs/api/Gantt/feature/TaskEdit that used to show TaskEditor and it has own events, as example https://bryntum.com/products/gantt/docs/api/Gantt/feature/TaskEdit#event-afterTaskEdit

We do have one event for any modification of task on data level, it's triggered by TaskStore, please see https://bryntum.com/products/gantt/docs/api/Gantt/data/TaskStore#event-change

All the best,
Alex


Post by johanbrodin »

Thx! The taskstore is working fine. We also figured out to catch it from the gantt html widget "(onDataChange)". Please close the ticket.


Post Reply