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

Trigger the loading status on the grid by javascript

Thread ID:

Created:

Updated:

Platform:

Replies:

142745 Feb 18,2019 05:37 AM UTC Feb 19,2019 10:34 AM UTC ASP.NET Web Forms 1
loading
Tags: Grid
Nestor Ochoa
Asked On February 18, 2019 05:37 AM UTC

Hi There,

I'm following an example that works perfect when I want to update the dataSource with a DataManager. The only issue is that I want to trigger the loading status of the ejGrid in the meantime that we are waiting for the answer.

example

Javacript:

     var vehicleId = event.data.VehicleCode;
     var auditTable = $("#<%= gvVehicleAudit.ClientID%>").ejGrid("instance");
     var query = new ej.Query();
     query.addParams("vehicleId", vehicleId);

var dataManager = ej.DataManager({ url: "VehicleBenefitsNew_N.aspx/vehicleAudit", crossDomain: true, adaptor: new ej.WebMethodAdaptor() });

var promise = dataManager.executeQuery(query);

// trigger loading on ejGrid

promise.done(function (e) {
                auditTable.dataSource(e.result);
            });

Many thanks in advance!

Kind Regards.

Nestor Ochoa


Vignesh Natarajan [Syncfusion]
Replied On February 19, 2019 10:34 AM UTC

Hi Nestor, 
 
Thanks for using Syncfusion products. 
 
Query: “The only issue is that I want to trigger the loading status of the ejGrid in the meantime that we are waiting for the answer” 
 
From your query, we understand that you need to display the waiting popup in ejGrid. we suggest you to achieve your requirement by showing and hiding the waiting popup from the Grid instance. 
 
Refer the below code example 
 
  var vehicleId = event.data.VehicleCode; 
     var auditTable = $("#<%= gvVehicleAudit.ClientID%>").ejGrid("instance"); 
     var query = new ej.Query(); 
     query.addParams("vehicleId", vehicleId); 
 
var dataManager = ej.DataManager({ url: "VehicleBenefitsNew_N.aspx/vehicleAudit", crossDomain: true, adaptor: new ej.WebMethodAdaptor() }); 
 
var promise = dataManager.executeQuery(query); 
 
auditTable.element.ejWaitingPopup("show"); 
// trigger loading on ejGrid 
 
promise.done(function (e) { 
    auditTable.dataSource(e.result); 
    auditTable.element.ejWaitingPopup("hide"); 
            }); 
 
Please get back to us if you have further queries.   
 
Regards, 
Vignesh Natarajan 
 


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