Help with Radwindow + Dynamic PDF Content + AJAX Loading

2 posts, 0 answers
  1. John
    John avatar
    22 posts
    Member since:
    Jan 2011

    Posted 10 Nov 2015 Link to this post

    Hi there -

    I currently have a page implemented where a radgrid is on the page, allowing each data item to have a radbutton which will open a radwindow as a modal.  This Navigate URL is another aspx page, which in the Page_Load event does some database activity and generates a dynamic PDF as binary data, which it then writes out to the Response buffer of that child/report page.  The effect of this is having a dynamic PDF load in a modal.  This all works great.

    However, this database query can take up to 8 seconds, and I wanted to give the user a loading panel (even simply spinning icon) in the radwindow until this data was ready, processed, and written to a byte array so it is ready for the response buffer.

    What would be the best approach here?  I know it gets a bit tricky due to the nature of this type of content (PDF) and AJAX knowing when the page is done loading so wanted to ask some pros.

    I was thinking perhaps I can simply have that child/report page that comes in the modal contain just a simple ASP Panel , and then perhaps after the Page_Load events has fired and it has the byte array ready with the PDF content then I can simply write it to the response buffer in there and then make the panel visible? 

    I just wasn't sure the best approach.

     Any help is greatly appreciated!

  2. Marin Bratanov
    Marin Bratanov avatar
    3558 posts

    Posted 11 Nov 2015 Link to this post

    Hello John,

    The easiest way is to set the ShowContentDuringLoad property of the RadWindow to false. It will show the built-in loading indicator.

    With IE, however, this will have a problem because IE does not fire the needed iframe events when a file is streamed. You can read more about this here:


    Marin Bratanov
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. DevCraft R3 2016 release webinar banner
Back to Top