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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Changing dataSource in ejGantt

Thread ID:





131947 Aug 4,2017 11:29 AM UTC Aug 9,2017 04:12 AM UTC JavaScript 3
Tags: ejGantt
Karol Wlodarek
Asked On August 4, 2017 11:29 AM UTC


I've got a question concerning datasource replacement in Gantt chart.
I aim to implement checkbox changing datasource connected to Gantt chart.
Below I attach example where I coded the solution, but every checkbox click triggers console error log (screen below).
My question is how to replace datasource or fix the console error.

Console error


Jonesherine Stephen [Syncfusion]
Replied On August 4, 2017 12:54 PM UTC

Hi Karol, 
We analyzed the provided sample. In this sample data source updated in improper way. Hence the console error occurs. We have modified the sample and updated the new data by using setModel. 
Please find the code example below: 
'toolbarClick': function (args) { 
            if (args.itemName == "ToggleTaskCB") { 
                 condition = !condition; 
                 var newData = condition ? dataSource : dataSource2, // my other dataSource 
                 ganttObj = $("#gantt").ejGantt("instance"); 
                //To update new data 
                 ganttObj.setModel({ "dataSource": newData }); 
Please find the modified sample from below location 
Please let us know if you have further assistance on this. 
Jone sherine P S. 

Karol Wlodarek
Replied On August 8, 2017 01:54 PM UTC

Thanks for reply.

It's works great.


Jayakumar Duraisamy [Syncfusion]
Replied On August 9, 2017 04:12 AM UTC

Hi Karol, 
We are glad that your issue has been resolved. Please let us know if you need any other assistance. 
Jayakumar D 


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon