RadAjaxLoadingPanel Won't Hide When Opening PDF

5 posts, 0 answers
  1. Brett
    Brett avatar
    11 posts
    Member since:
    Jan 2012

    Posted 28 Sep 2012 Link to this post

    On my website, I have a master page where my RadAjaxLoadingPanel resides. On my content page, I have a RadGrid where one of the template columns is an ImageButton that when clicked will read a file from my database and using the code below will allow the user to view it:

    Response.Buffer = true;
    Response.Charset = "";
    Response.Cache.SetCacheability(HttpCacheability.NoCache);
    Response.AddHeader("content-disposition", string.Format("attachment;filename={0}", "MillCert.pdf"));
    Response.BinaryWrite(BinaryFile);
    Response.Flush();
    Response.End();

    The entire RadGrid is wrapped in a RadAjaxPanel with it's ClientEvents-OnRequestStart set to cancel the Postback:

    function conditionalPostback(sender, args) {
        args.set_enableAjax(false);
    }

    This works fine but after the PDF is opened, the RadAjaxLoadingPanel just stays on and won't hide!

    I've searched through the forums and Google but nothing anyone has suggested will work.

    The opening of the file is done through the OnItemCommand method of the RadGrid but I also have some custom filtering being done through there so I can't separate it out, I need it ONLY for this one item.

    Any suggestions?
  2. Curtis
    Curtis avatar
    23 posts
    Member since:
    Jan 2008

    Posted 28 Sep 2012 Link to this post

    I have the exact same issue. How can we force the AjaxLoadingPanel to hide once the postback event has finished writing out to the Response stream on the server-side? Is there any client side page event that fires? Can we register any type of Javascript to run?
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Daniel
    Admin
    Daniel avatar
    4945 posts

    Posted 02 Oct 2012 Link to this post

    Hi guys,

    You could try the approach, demonstrated in the following code-library:
    Show loading panel when exporting RadGrid

    Best regards,
    Daniel
    the Telerik team
     
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
     
  5. Sriram
    Sriram avatar
    5 posts
    Member since:
    Mar 2014

    Posted 31 Mar 2014 in reply to Daniel Link to this post

    This URL does not work!!

    I experience the same problem what others have written in the thread. Please share the working URL!!

    Thanks,
    Sriram
  6. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 01 Apr 2014 in reply to Sriram Link to this post

    Hi,

    Please have a look into this CodeLibrary which discuss about the same scenario.

    Thanks,
    Shinu.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017