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

Help with Radwindow + Dynamic PDF Content + AJAX Loading

1 Answer 106 Views
Window
This is a migrated thread and some comments may be shown as answers.
Robert
Top achievements
Rank 1
Robert asked on 10 Nov 2015, 04:56 PM

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!

1 Answer, 1 is accepted

Sort by
0
Marin Bratanov
Telerik team
answered on 11 Nov 2015, 08:14 AM

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: http://www.telerik.com/forums/issue-with-showcontentduringload#2oRSD9FEZESwEey9LE_NBA.

Regards,

Marin Bratanov
Telerik
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
Tags
Window
Asked by
Robert
Top achievements
Rank 1
Answers by
Marin Bratanov
Telerik team
Share this question
or