When you export a grid with a large amount of data, you might want to show the LoadingPanel during exporting. To do so, handle the button's client-side Click event to:
1) Show the loading panel;
2) Perform an ajax request to the server to export the grid;
3) Hide the loading panel on success and submit the form to attach the exported document to the response;
4) Starting with version 15.1, it is necessary to call a special internal OnPost method in order to synchronize the internal grid's state to make it possible to collect and send it as custom request data (i.e., the callback state that stores end-user modifications such as sorting, grouping, filtering, selection, etc.). TODO: Use Ajax.BeginForm instead of jQuery.ajax
[JScript]function OnClick(s, e){ gridView.OnPost(); $.ajax({ url: '@Url.Action("CallbackExport", "Home")', type: "POST", data: $("#form").serialize(), beforeSend: (function(data){ LoadingPanel.Show();})}).done(function(data){ LoadingPanel.Hide(); $("#form").submit();});}