Guys,
I have 2 radwindows that are controlled buy WindowManager. Both of them host the same user control. In the first scenario control will generate some HTML and assigned it to a label.text. In a second scenario I will use Response.BinaryWrite to write pdf document to a response stream. I use DestroyOnClose="true” to make sure I have a clean load every time. So far so good, the only one thing that I can not figure out is how to do I show “Loading” image. I cannot do “ShowContentDuringLoad="false"” because the content for a window that is writing to response will never come up. This is also in your documentation (Note: If you intend to show a PDF file in RadWindow instead of a standard page, make sure that ShowContentDuringLoad is set to true. Otherwise if the loaded content is not a page, window.onload will not be fired and RadWindow will not show the content.)
So what can I do? I really need to make this work because it might take up to 10 seconds while those windows are fully loaded.
| <telerik:RadWindowManager ID="RadWindowManager1" runat="server" |
| Skin="Web20" |
| VisibleStatusbar="false" IconUrl=" " Height="860px" Width="750px" Modal="true" Behaviors="Close,Move,Resize" |
| DestroyOnClose="true" > |
| <Windows> |
| <telerik:RadWindow ID="radPreview" runat="server" Title="Preview" ></telerik:RadWindow> |
| <telerik:RadWindow ID="radPreviewPdf" runat="server" Title="PDF Preview"></telerik:RadWindow> |
| </Windows> |
| </telerik:RadWindowManager> |
and I open an window with
| function launchPreview(type) { |
| url = "blablbla.aspx?bla=sds"; |
| if (type == 'pdf') { |
| url = url + "&show=pdf" |
| var oWnd = window.radopen(url, "radPreviewPdf"); |
| oWnd.set_title("PDF Preview"); |
| oWnd.set_showContentDuringLoad(true); |
| return; |
| } else { |
| var oWnd = window.radopen(url, "radPreview"); |
| oWnd.set_title("HTML Preview"); |
| } |
| } |