How to handle refresh data gantt

Discuss issues related to v3.x
Post Reply
User avatar
thanhtuk9acntt
Posts: 5
Joined: Wed Apr 19, 2017 10:39 am

How to handle refresh data gantt

Post by thanhtuk9acntt » Wed Apr 19, 2017 12:07 pm

Hi everyone
I have a problem with gantt.
I have got code from link : https://www.bryntum.com/examples/gantt- ... tchensink/
and I using only gantt view and render to a div and remove all toolbar for customize.
I want to refresh gantt from event another button.
so how i can do it.

User avatar
pmiklashevich
Core Developer
Core Developer
Posts: 2579
Joined: Fri Apr 01, 2016 11:08 am

Re: How to handle refresh data gantt

Post by pmiklashevich » Wed Apr 19, 2017 6:02 pm

Hello.

If you need to reload data, you can call reload method on task store and on dependency store.

Code: Select all

Ext.first('ganttpanel').getTaskStore().reload();
Ext.first('ganttpanel').getDependencyStore().reload();
If you need to refresh view with data which was loaded early, you can get view and call refresh method.

Code: Select all

Ext.first('ganttpanel').getView().refresh();
If you need a help to create a button please refer to Ext docs.

P.S. Please note that Ext.first('ganttpanel') is used here just for example. It returns the first match component on the page. So be careful with using it. You can select the component by your own way, or just keep the link to it somewhere.
Pavel Miklashevich - Core Developer

User avatar
thanhtuk9acntt
Posts: 5
Joined: Wed Apr 19, 2017 10:39 am

Re: How to handle refresh data gantt

Post by thanhtuk9acntt » Thu Apr 20, 2017 10:14 am

thanks. I try it

Post Reply