We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

How to refresh data source and start and end date in EJ2 Gantt Chart

How to refresh data source and start and end date in EJ2 Gantt Chart>

gantt = new ej.gantt.Gantt({
            dataSource: data,
            renderBaseline: true,
            taskFields: {
                id: 'OrderNumber',
                name: 'Title',
                startDate: 'StartTime',
                duration: 'EstimatedDurarion',
            },              
            height: '450px',
            width: '900px',
            dayWorkingTime: [{ from: 0, to: 24 }],
            projectStartDate: new Date('04/08/2019  12:00:00 AM'),
            projectEndDate: new Date('04/08/2019 11:59:00 PM')
        });
        gantt.appendTo('#divGanttChart');

i have like this and i tried update data source like below
gantt.dataSource=newData;
gantt.dataBind();

Its not working and page was not responding after that.
Can some one help me to resolve this.
Thanks,
Tam



2 Replies

JA Jesus Arockia Sankaran S Syncfusion Team April 29, 2019 10:29 AM UTC

Hi Tamizh, 
 
Currently, we don’t have support for updating data source dynamically. We will implement this support and include this feature in our upcoming Volume 1 2019, service pack 1 release which is expected to be available on mid of May 2019. 
 
You can track the status of this feature from the below link. 
 
We can dynamically update the start date and end date using the updateProjectDates method. 
Find the code example below. 
   
  var obj = document.getElementById('Default').ej2_instances[0]; 
  obj.updateProjectDates(new Date('03/20/2019'), new Date('08/25/2019'), false) 
 
 
Refer the below sample for your reference. 
 
Please get back to us if you require any further assistance on this.  
 
Regards,  
Jesus Arockia Sankaran S                                                         



JA Jesus Arockia Sankaran S Syncfusion Team May 15, 2019 06:10 PM UTC

Hi Tamizh,  
 
We are glad to announce that our  Volume 1 SP1 Release v17.1.0.47 is rolled out and is available for download under the following link. 
 
 
We thank you for your support and appreciate your patience in waiting for this release. Please get in touch with us if you would require any further assistance. 
 
Regards, 
Jesus Arockia Sankaran S 


Loader.
Live Chat Icon For mobile
Up arrow icon