Page 1 of 1

[ANGULAR] Reload task data in grid

Posted: Fri Nov 26, 2021 3:51 pm
by prem.k@zetwerk.com

Hi,
I want to reload task data after some action in bryntum grid. Ideally it should just update the affected cell rather than loading complete task data. How can we do that?


Re: [ANGULAR] Reload task data in grid

Posted: Fri Nov 26, 2021 4:14 pm
by Animal

This might be what you need: https://www.bryntum.com/docs/grid/api/Core/data/Store#config-syncDataOnLoad

But loading the whole set of task data seems very wasteful. Is there any way you can just change what you need to change?


Re: [ANGULAR] Reload task data in grid

Posted: Fri Nov 26, 2021 7:30 pm
by prem.k@zetwerk.com

Will this config will work if data is coming from backend. I have used below code to load data on load:

this.gantt.project.loadInlineData({
        tasksData: tasksData,
        dependenciesData: dataDependency
      });

What if i want to reload data again after calling some api, do i need to call above code with config syncDataOnLoad?


Re: [ANGULAR] Reload task data in grid

Posted: Mon Nov 29, 2021 1:36 pm
by alex.l

Yes, that will work as expected if you set syncDataOnLoad: true. Check the docs https://bryntum.com/docs/gantt/api/Core/data/mixin/StoreSync#config-syncDataOnLoad

What loadInlineData do, is set store.data = [...] for all stores of the project one by one.