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

set_enableAjax and Ajax loading panel

2 Answers 194 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Adam Lindsay
Top achievements
Rank 1
Adam Lindsay asked on 12 Nov 2009, 06:11 PM
I have a grid in a ajaxpanel that I need to export from.  I followed the advise of the following URL:

http://www.telerik.com/community/code-library/aspnet-ajax/general/export-radgrid-content-to-excel-word-csv-pdf-with-ajax-enabled.aspx

The ajaxpanel has a loadingpanel with a custom skin (to change the animated gif).  After the first export where set_enableAjax(false) is performed, the loading panel is still displayed for every ajax request but, the animated gif does not animate. (this occurs only after the export runs. 

Here is the code on my ajaxpanel request started event:

function

 

requestStarted(ajaxManager, eventArgs) {

 

 

if (eventArgs.get_eventTarget().indexOf("btnExcel") > -1 ||

 

eventArgs.get_eventTarget().indexOf(

"btnPDF") > -1)

 

eventArgs.set_enableAjax(

false);

 

}

Any thoughts on how I can get the animated gif to move again?

Thanks in advance,

- Adam

2 Answers, 1 is accepted

Sort by
0
Dimo
Telerik team
answered on 13 Nov 2009, 02:26 PM
Hello Adam,

We are familiar with this problem, but I am aftraid it is related to the browser behavior. Internet Explorer simply stops all animations on the page after a file has been sent for download by the client. This can be reproduced with no Telerik controls on the page.

I can only suggest you to use some appropriate non-animated loading image or no loading image at all.

Best wishes,
Dimo
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
James Daresta
Top achievements
Rank 1
answered on 17 Jun 2010, 02:03 PM
I found a way to make the animated gifs work after doing a an export. Its not the best solution, but it works. I just simply used a template image and over rode the background image of the style sheet in my custom style sheet. Note the style has to the be name of the skin you are using. Optionally you could use no skin for the panel and style like the skin. From what I have seen it appears to only happen if an animated gif is used as a background image.

ASPX Code
    <telerik:RadAjaxLoadingPanel ID="ralpMainLoadingPanel" runat="server">  
        <table height="100%">  
            <tr> 
                <td valign="middle">  
                    <asp:Image ID="imgMainLoadingPanel" runat="server" ImageUrl="~/images/loading.gif" /> 
                </td> 
            </tr> 
        </table> 
    </telerik:RadAjaxLoadingPanel>   

CSS Style
.RadAjax_Default div.raDiv  
{  
    background-image:none;  
Tags
Grid
Asked by
Adam Lindsay
Top achievements
Rank 1
Answers by
Dimo
Telerik team
James Daresta
Top achievements
Rank 1
Share this question
or