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> |
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"); |
} |
} |
mm.dd.yyyy
mm-dd-yyyy
month day yyyy
month day yyyy
month day, yyyy
mmddyyyy
mm,dd,yyyy
<
telerik:RadGrid
ID
=
"gvDetail"
runat
=
"server"
AllowPaging
=
"True"
AutoGenerateColumns
=
"False"
GridLines
=
"None"
OnItemCommand
=
"gvDetail_ItemCommand"
OnNeedDataSource
=
"gvDetail_NeedDataSource"
Width
=
"100%"
>
<
ClientSettings
>
<
Scrolling
AllowScroll
=
"True"
/>
</
ClientSettings
>
<
MasterTableView
AutoGenerateColumns
=
"false"
DataKeyNames
=
"SNo,RegRegion,CCCName,Address,ContactDetails,Benefits"
>
<
NoRecordsTemplate
>
No data available</
NoRecordsTemplate
>
<
Columns
>
<
telerik:GridBoundColumn
DataField
=
"SNo"
HeaderText
=
"Serial Number"
/>
<
telerik:GridBoundColumn
DataField
=
"RegRegion"
HeaderText
=
"Location"
/>
<
telerik:GridBoundColumn
DataField
=
"CCCName"
HeaderText
=
"Child Care Centre Name"
/>
<
telerik:GridBoundColumn
DataField
=
"Address"
HeaderText
=
"Address"
/>
<
telerik:GridBoundColumn
DataField
=
"ContactDetails"
HeaderText
=
"URL & Contact Details"
/>
<
telerik:GridBoundColumn
DataField
=
"Benefits"
HeaderText
=
"Benefits"
/>
<
telerik:GridTemplateColumn
HeaderText
=
"Edit"
UniqueName
=
"TemplateColumn"
>
<
ItemTemplate
>
<
asp:LinkButton
ID
=
"lnkEdit"
runat
=
"server"
CausesValidation
=
"false"
CommandName
=
"ViewSelected"
Text
=
"Edit"
></
asp:LinkButton
>
</
ItemTemplate
>
</
telerik:GridTemplateColumn
>
<
telerik:GridTemplateColumn
HeaderText
=
"Delete"
UniqueName
=
"TemplateColumnDel"
>
<
ItemTemplate
>
<
asp:LinkButton
ID
=
"lnkDelete"
runat
=
"server"
CausesValidation
=
"false"
CommandName
=
"Delete"
OnClientClick
=
"return confirm('Are you certain you want to delete?');"
Text
=
"Delete"
>
</
asp:LinkButton
>
</
ItemTemplate
>
</
telerik:GridTemplateColumn
>
</
Columns
>
</
MasterTableView
>
</
telerik:RadGrid
>