Our state of the art Gantt chart


Post by avonplato »

Hi team,

I find it really difficult to find any useful information on the Gantt in this forum or searching in google. So apologies if im asking something thats already been asked.

I think i have a simple request. I would like to listen for an update on the progress % complete, either by the user dragging the progress bar, or when they change the value on the advanced edit dialog. Once i have the new value i would simply like to call my API method an update the task.

Can you put me out of my misery and point me to the documentation or an example in the package file we downloaded.

Thanks
Adrian

Post by mats »

You should listen to taskStore#update event and see if the progress field was changed. Docs: https://bryntum.com/docs/gantt/#Common/data/Store#event-update

In the docs you see a 'toSet' which is an object containing the new data to be set.

Post by avonplato »

Thanks Mats, is there an example of this anywhere in the package? I think the bit im struggling with is where to add the listener. My configuration is pretty simple and its based on requirejs example where we load the data from an api.

A

Post by avonplato »

Ha, as is always the case seemingly. No sooner had i submitted my response the light bulb finally went on.
for anyone else who might have the same issue, Mats link above was the switch. I had to add the listener to the taskStore of my gantt. Doing this i can now track any update made on the task.
gantt.taskStore.addListener("update", function(task) {console.log(task);});
Thanks Mats.

Post by mats »

Glad it works now :)

Post Reply