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
close icon

How to show progress ring?

I'm using row drag & drop that involves a server-side call that can take 15-20 seconds. I'd like to show the progress ring as if the grid is loading new data so that the customer will not think that the app is just stuck. Is it possible to do this? I'm picturing a call to show & hide the ring at the beginning & end of the javascript function that calls the server-side code.

3 Replies

RU Ragavee U S Syncfusion Team December 16, 2016 10:14 AM UTC

Hi Brian, 

We suspect that your requirement is to show/hide waitingpopup control when triggering a server side call and updating the grid dataSource.  

<script type="text/javascript"> 
 
    //click event of button 
    function getData(e) { 
        $("#Grid").ejWaitingPopup("show");//show the waitingpopup control before ajax call 
        $.ajax({ 
            url: "/Home/GetData", 
            type: "POST", 
            dataType: 'json', 
            contentType: "application/json; charset=utf-8", 
            success: function (data) { 
                $("#Grid").ejGrid({ dataSource: data.d.data }); 
                $("#Grid").ejWaitingPopup("hide");//hide the control after binding data to grid 
            } 
        }); 
    } 
 
    </script> 


Regards, 
Ragavee U S. 



RB R Brian Lindahl December 16, 2016 04:35 PM UTC

Actually, I mis-stated the objective just slightly. Yes, the waitingpopup is what I'm looking for... however, in this case it's not a javascript call... I was remembering the wrong handler. In this case, I'm using

.RowDropSettings(drop => drop.RowDropMapper("/Products/RowDropHandler"))
   
Is there a way to turn on the waitingpopup during the rowmapper call? Is there a way to handle the row drop in javascript so that I can add the call as you described? 


RU Ragavee U S Syncfusion Team December 19, 2016 08:53 AM UTC

Hi Brian, 

Yes. We do have ejGrid client side events “rowDrop” and “beforeRowDrop” which will be triggered upon dropping rows in grid. Please refer to the below documentation for more information. 



Regards, 
Ragavee U S. 


Loader.
Live Chat Icon For mobile
Up arrow icon