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

Gantt waiting popup

Thread ID:

Created:

Updated:

Platform:

Replies:

141290 Dec 4,2018 03:34 PM UTC Dec 17,2018 01:04 PM UTC Angular 11
loading
Tags: ejGantt
oscar bartolome
Asked On December 4, 2018 03:34 PM UTC

Hi,

I want to activate a waiting popup when dinamically updating gantt data. I want it to spin during the data loading time. I'm trying using ej-waitingpopup, but I'm unable to make this. Could you please provide a system or example to get this?

Thanks.

Punniyamoorthi Elangovan [Syncfusion]
Replied On December 5, 2018 01:19 PM UTC

Hi Oscar, 
Thank you for contacting Syncfusion support.  
Due to JavaScript Synchronous behavior the waiting popup loader animation will be halted when updating the Gantt control with datasource. Since we are processing the Gantt data in client side with JavaScript calculations.  
Please get back to us know if you require further assistance on this.  
Regards,  
Punniyamoorthi 


oscar bartolome
Replied On December 11, 2018 10:05 AM UTC

Hi,

is it not possible to do it? Our data amount sometimes is big enough to make the app freeze for a while, so it would be fine to show any loading popup.

Any idea to solve it?

Thanks

Punniyamoorthi Elangovan [Syncfusion]
Replied On December 11, 2018 01:42 PM UTC

Hi Oscar, 
In Gantt there is load  and create client side events are available, the load event will triggered while Gantt is initiate the rendering and create event will triggered when Gantt is rendered completely. We have prepared the sample for rendering the waiting popup in load event and hidden that popup in create event, but the waiting popup didn’t render due to the JavaScript is not ideal. Because the Gantt is rendering with JavaScript calculations. We have prepared the sample for your reference, please find the sample link below 
Regards, 
Punniyamoorthi 
 


oscar bartolome
Replied On December 11, 2018 02:07 PM UTC

Hi,

and so the answer is that it is not possible to show a loading popup during the gantt data loading?  Not even using any kind of service or http interceptor?

Thanks

Jesus Arockia Sankaran S [Syncfusion]
Replied On December 12, 2018 12:45 PM UTC

Hi Oscar, 
 
We could render waiting popup using “load” and “actionComplete” client-side event in Gantt.  To render the waiting popup, we need to populate the data by using ejDataManager.  
 
Code Snippet: 
[html] 
<ej-waitingpopup id="popup" ></ej-waitingpopup>  
<div id="ganttParent"> 
<ej-gantt id="GanttControl" [dataSource]="dataManager" (load)="load($event)" (actionComplete)="actionComplete($event)" > 
</ej-gantt> 
</div> 
 
[ts] 
export class AppComponent { 
    public ganttData: any;  
    public dataManager:any;    
    constructor() {                         
             this.dataManager = ej.DataManager(this.ganttData); 
    }    
   load(e: any) { 
       var obj = $("#popup").data("ejWaitingPopup"); 
       obj.setModel({showOnInit: true,target: "#ganttParent"});     
    } 
   actionComplete(e: any) { 
            if(e.requestType == "create"){                  
                         var obj = $("#popup").data("ejWaitingPopup");                            
                          obj.hide(); 
       }     
    } 
} 
 
 
Please get back to us if you require any further assistance on this. 
 
Regards, 
Jesus Arockia Sankaran S 


oscar bartolome
Replied On December 12, 2018 02:07 PM UTC

Hi,

could you please provide an example that ej.DataManager loads remote data instead of local data, like this:

        var data = [];

this.dataManager = new ej.DataManager({
url: me.config["integraAPIUrl"] + "/api/v1.0/production/productionData/workshop",
async: false,
crossDomain: true,
});

var query = new ej.Query();
var dataObj = this.dataManager.executeQuery(query);

dataObj.done(function (e) {
data = e.result;
});

It doesn't seem to show waiting popup with remote data.

Thanks


Jesus Arockia Sankaran S [Syncfusion]
Replied On December 13, 2018 01:26 PM UTC

Hi Oscar, 
 
Thank you for your update. 
 
We have checked your code snippet. As per your requirement, we have prepared the sample with remote data instead of local data. 
 
Code Snippet: 
[TS] 
export class AppComponent { 
    public ganttData: any; 
      public dataManager: any; 
    constructor() { 
        this.dataManager = new ej.DataManager({ 
            url: "http://internaldemo.syncfusion.com:8072/", 
            async: true, 
            crossDoamin: true 
        }); 
    } 
 
    public treeColumnIndex = 1; 
    load(e: any) { 
        $("#ganttParent").ejWaitingPopup({ showOnInit: true }); 
    } 
    actionComplete(e: any) { 
        if (e.requestType == "create") { 
            var obj = $("#ganttParent").ejWaitingPopup("instance"); 
            obj.hide(); 
        } 
    } 
    
} 
 
 
Note: We suggest you to provide the async value as “true” in the dataManger, if we set async value as “false” then the JavaScript will wait for server side response, so the waiting popup will not showing.  
 
Please get back to us if you require any further assistance on this. 
 
Regards, 
Jesus Arockia Sankaran S 


oscar bartolome
Replied On December 13, 2018 02:08 PM UTC

Hi,

if I try using asyc property as true, the data is not rendered in the gantt. Besides, you told me to use async property as false in the previous topic:

https://www.syncfusion.com/forums/138577/datamanager-for-resources

Any idea why the data is not rendered?

Thanks

Jesus Arockia Sankaran S [Syncfusion]
Replied On December 14, 2018 12:32 PM UTC

Hi Oscar, 
 
Thanks for the update. 
 
We insist you to confirm us that whether the data fetched form the following URL {url: me.config["integraAPIUrl"] + "/api/v1.0/production/productionData/workshop”} is a data source collection or data source collection and resource collection. For your reference, We have prepared a sample for assuming that the URL only returning the data source collection. 
 
Code Snippet: 
 
[TS]  
export class AppComponent {  
    public ganttData: any;  
      public dataManager: any;  
    constructor() {  
        this.dataManager = new ej.DataManager({  
            url: "http://internaldemo.syncfusion.com:8072/",  
            async: true,  
            crossDoamin: true  
        });  
    }  
} 
 

Please get back to us if you require any further assistance on this. 
 
Regards, 
Jesus Arockia Sankaran S 


oscar bartolome
Replied On December 14, 2018 12:40 PM UTC

Hi,

we have two calls:

One for the data:

        this.dataManager = new ej.DataManager({
url: me.config["integraAPIUrl"] + "/api/v1.0/production/productionData/workshop",
async: false,
crossDomain: true,
});
var query = new ej.Query();
var dataObj = this.dataManager.executeQuery(query);
dataObj.done(function (e) {
data = e.result;
});

And another for the resources:

        this.resourcesManager = new ej.DataManager({
url: me.config["integraAPIUrl"] + "/api/v1.0/production/workcenters",
async: false,
crossDomain: true
});
var query = new ej.Query();
var resourcesObj = this.resourcesManager.executeQuery(query);
resourcesObj.done(function (e) {
resources = e.result;
});

Thanks



Jesus Arockia Sankaran S [Syncfusion]
Replied On December 17, 2018 01:04 PM UTC

Hi Oscar, 
 
We have checked your code snippet. We suggest you to provide the dataSource to the Gantt control directly using DataManager without done function. 
 
Code Snippet: 
[TS]  
export class AppComponent {  
      public ganttData: any;  
      public dataManager: any;  
      constructor() {  
        this.dataManager = new ej.DataManager({  
            url: "http://internaldemo.syncfusion.com:8072/",  
            async: true,  
            crossDoamin: true  
        });  
    }  
} 
 
Also, we suggest you to pass the resource collections using DataManager and “async” value as false with done function.  
 
Code Snippet: 
constructor() {  
        this.projectResources  = this.getResources();  
    }  
getResources() { 
         
        var resources = []; 
        var dataManager = new ej.DataManager({ 
            url: "http://internaldemo.syncfusion.com:8094/", 
            async: false, 
            crossDoamin: true 
        }); 
        var query = new ej.Query(); 
        var dataObj = dataManager.executeQuery(query); 
        dataObj.done(function (e) { 
            resources = e.result; 
        }); 
        return resources 
    }   
 
Note: If we pass the large resource collection with async value as “false” then the waiting popup may not be rendered due to the JavaScript will waiting for server side response. 
 

Please get back to us if you require any further assistance. 
Regards, 
Jesus Arockia Sankaran S 


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.

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