This is a migrated thread and some comments may be shown as answers.

RadGrid Export & AjaxLoadingPanel

1 Answer 113 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Miguel
Top achievements
Rank 1
Miguel asked on 04 Jan 2012, 05:49 PM
I have a problem getting this right.

function requestStart(sender, args) {
                currentLoadingPanel = $find("<%= RadAjaxLoadingPanel1.ClientID %>");
                //debugger;
                if (args.get_eventTarget().indexOf("grdTekGrid") >= 0) {
                    currentUpdatedControl = "<%= grdTekGrid.ClientID %>";
                }
 
                if (args.EventTarget.indexOf("ExportToExcelButton") >= 0) {
                    args.EnableAjax = false;
                }
                //show the loading panel over the updated control
                currentLoadingPanel.show(currentUpdatedControl);
            }
 
            function ResponseEnd() {
                //debugger;
                //hide the loading panel and clean up the global variables
                if (currentLoadingPanel != null)
                    currentLoadingPanel.hide(currentUpdatedControl);
                currentUpdatedControl = null;
                currentLoadingPanel = null;
            }

This is the code i've seen in many threads.

The problem here is if i let this stay as it's is, the loading panel just stucks there (the circle does not move, it's "frozen") and after a while pop-ups the prompt open/save excel file. But even after the popup the loading panel doesn't disappear.... 

If i remove this bit:
if (args.EventTarget.indexOf("ExportToExcelButton") >= 0) {
                    args.EnableAjax = false;
                }

The loading panel works great, but instead of being prompt to open/save the file, the contents of the table that is created is loaded/pasted in the grid itself....

Thanks in advance for all the help

1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 05 Jan 2012, 06:06 AM
Hello,

Try setting the export settings as shown below.
aspx:
<ExportSettings ExportOnlyData="true" OpenInNewWindow="true" IgnorePaging="true">
</ExportSettings>
Also check the following forum thread which discussed similar scenario.
Display Loading Panel during Export

Thanks,
Princy.
Tags
Grid
Asked by
Miguel
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Share this question
or