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.
Unfortunately, activation email could not send to your email. Please try again.

Changing dataSource in ejGantt

Thread ID:

Created:

Updated:

Platform:

Replies:

131947 Aug 4,2017 07:29 AM Aug 9,2017 12:12 AM JavaScript 3
loading
Tags: ejGantt
Karol Wlodarek
Asked On August 4, 2017 07:29 AM

Hi,

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

Regards,
Karol

Jonesherine Stephen [Syncfusion]
Replied On August 4, 2017 08:54 AM

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. 
Regards, 
Jone sherine P S. 


Karol Wlodarek
Replied On August 8, 2017 09:54 AM

Thanks for reply.

It's works great.

Regards, 
Karol

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

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


CONFIRMATION

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.

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.

;