or
I used the examples I could find:
<
input
type
=
"submit"
value
=
"Export to Excel"
name
=
"export"
id
=
"excel"
formmethod
=
"post"
class
=
"btn-secondary searchBtn px-5"
/>
and then:
<
script
type
=
"text/javascript"
>
$(function(){
kendo.ui.progress.messages = {
loading: "Processing..."
};
function displayLoading(target) {
var element = $(target);
kendo.ui.progress(element, true);
this.form.submit(function(){
kendo.ui.progress(element, false);
});
}
$("#excel").click(function(){
displayLoading(document.body);
});
});
</
script
>
The problem is that the controller's action returns a file:
public ActionResult Index(...)
{
...
return File(renderedBytes, mimeType, fileName); // This is an Excel file.
}
it looks to me that the
kendo.ui.progress(element, false);
is never triggered, therefore the progress overlay stays displayed (and the form is disabled) even after the Excel file is returned to the browser.
How can I make the overlay disapear once the Excel file has been returned?
Thanks.