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.
Syncfusion Feedback

Hide loading after action result

Thread ID:

Created:

Updated:

Platform:

Replies:

130436 May 12,2017 08:57 AM May 16,2017 03:09 AM ASP.NET MVC 3
loading
Tags: XlsIO
Manolo
Asked On May 12, 2017 08:57 AM

Hi,

I like show a waiting popup while I've creating an exel. But when the action result finish, I like hide the waiting pop up.

How can I do it? The waiting is always running.

I prefeer use an ActionResult that an ajax post

I attach an example

Attachment: XlsioExample_eed4cd23.zip

Prince Oliver [Syncfusion]
Replied On May 15, 2017 07:56 AM

Hi Manolo,   
   
Thank you for contacting Syncfusion support.   
   
To display a waiting popup while creating an excel, we need to show the waiting popup on button click and perform the AJAX post to the controller ActionResult and use the AJAX success method to hide the waiting popup. Kindly refer to the following code snippet.   
   
<script >   
    function onClick()   
    {   
        var wp = $("#target").data("ejWaitingPopup");   
        wp.show();   
        $.ajax({   
            type: "POST",   
            url: "XlsIOFeatures",   
            data: { "SaveOption": $('input[type="radio"]:checked').val() },   
            successfunction () {   
                var wp = $("#target").data("ejWaitingPopup");   
                wp.hide();   
            }   
        });   
    }   
</script>   
   
Kindly refer to the following link for the sample:http://www.syncfusion.com/downloads/support/forum/130436/ze/XlsioExample-1555051630   
   
Regards,   
Prince   


Manolo
Replied On May 15, 2017 11:37 AM

I'm sorry, but in your example the excel is not downloading.







Sridhar Sukumar [Syncfusion]
Replied On May 16, 2017 03:09 AM

Hi Manolo, 

  

Excel file could not be downloaded directly in client machine using Ajax call. However, this can be achieved by a workaround by saving the Excel document in the disk and downloading it. Please find the below code sample to download the Excel file. 

  

Code Example: 

  

string fullPath = Path.Combine(Server.MapPath("~/temp"), file); 

byte[] fileByteArray = System.IO.File.ReadAllBytes(fullPath); 

System.IO.File.Delete(fullPath); 

return File(fileByteArray, "application/vnd.ms-excel", file); 

  

We have prepared the sample for the same. The sample can be downloaded from following link. 

  

Sample Link: http://www.syncfusion.com/downloads/support/directtrac/general/ze/XlsioExample994700578 

  

Please let us know if you have any concerns. 

  

Regards, 

Sridhar 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.

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

;