Hi
In developing an application which is primarily Ajax based and therefore updates HTML markup without refreshing the browser page itself, we are having trouble with re-displaying a Gantt area for a second time.
To display a Gantt, we use: gantt1.init(“gantt_here”); But the “gantt_here” Div can get subsequently removed by the an ajax call which overwrites the part of the page containing that Div. To overcome this, we are currently using
var gantt1 = Gantt.getGanttInstance();
and then calling gantt1.init(“gantt_here”);
which creates a new Gantt instance each time the user requests to show a gantt chart. But our concern is that we’re repeatedly creating Gantt instances. There is NO requirement to show more than one Gantt chart on screen at the same time, but we have found creating new instances is the only way to make it work reliably.
If we just call gantt.init without creating a new instance, we find that event handlers are then called for each newly “inited” gantt, so it seems the event handlers get duplicated via gantt.init. So we figured we must be doing something fundmentally wrong in our approach.
Many thanks.
Best regards
Keith