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

Reload Data with DataManagerUrl

Thread ID:





149190 Nov 18,2019 09:50 AM UTC Nov 19,2019 09:53 AM UTC ASP.NET MVC - EJ 2 1
Tags: Gantt Chart
Peter Rosenstein
Asked On November 18, 2019 09:50 AM UTC

i like to reload the Gantt-Data on a java-script event.
I use Datamanager.Url in the Datasource
Is there a function where i can say to the gantt control to reload the data ?

with best regards from Austria
Peter Rosenstein

Pooja Priya Krishna Moorthy [Syncfusion]
Replied On November 19, 2019 09:53 AM UTC

Hi Peter, 
Greetings from Syncfusion support. 
In Gantt, we can dynamically change the data source by directly assigning the new data to the dataSource property. We prepared a sample, in which Gantt is loaded initially, with the data fetched from the server using DataManager support. On Button click, we had dynamically updated the Gantt with newly fetched data from the server using dataSource property. Please find the below code example. 
<button onclick="reloadData()">Reload data</button> 
function reloadData() { 
   var obj = document.getElementById("Gantt").ej2_instances[0]; 
   var newData = new ej.data.DataManager({ 
            url: '/Home/reloadData', 
            adaptor: new ej.data.UrlAdaptor, 
            crossDomain: true, 
   obj.dataSource = newData; 
Please get back to us if you require further assistance on this. 
Note: We have removed bin and obj folder in the provided sample for security reasons. 
Pooja Priya K. 


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

Live Chat Icon For mobile
Live Chat Icon