I'm trying to have an application open a radWindow and then print the content inside it. For what I saw it looks like I need to acces the frame element of the radWindow to acheive this. My problem is when I use the method get_contentFrame() it always return null. I tought that I might be beacause the radWindow was not loaded so I tried to call the method from a button inside it but still have the return value null.
I have reproduce the problem a small application, so it is not a problem in my main project. Here is the code :
Thank you for your time,
Sébastien
I have reproduce the problem a small application, so it is not a problem in my main project. Here is the code :
<%@ Page Language="VB" AutoEventWireup="false" CodeBehind="Default.aspx.vb" Inherits="RadControlsWebApp4._Default" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head runat="server"> <title></title> <telerik:RadStyleSheetManager id="RadStyleSheetManager1" runat="server" /></head><body> <form id="form1" runat="server"> <telerik:RadScriptManager ID="RadScriptManager1" runat="server"> <Scripts> <%--Needed for JavaScript IntelliSense in VS2010--%> <%--For VS2008 replace RadScriptManager with ScriptManager--%> <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" /> <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js" /> <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js" /> </Scripts> </telerik:RadScriptManager> <script type="text/javascript"> //Put your JavaScript code here. function btn_onclick() { var win = $find("<%= wndPrint.ClientID %>"); win.set_modal(true); win.show(); var frame = win.get_contentFrame(); alert(frame); } function Button2_onclick() { var win = $find("<%= wndPrint.ClientID %>"); var frame = win.get_contentFrame(); alert(frame); } </script> <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"> </telerik:RadAjaxManager> <telerik:RadSkinManager ID="RadSkinManager1" Runat="server" Skin="Office2007"> </telerik:RadSkinManager> <div> <input id="btn" type="button" value="Print" onclick="return btn_onclick()" /> <telerik:RadWindow ID="wndPrint" runat="server" Skin="Office2007"> <ContentTemplate> <p> fvejsh ksad ksla gjkfhsdajkg hfskjd ahgkfhdasgkl fd</p><hr /> <p>fdsi fdsjafkh ajkgfda ghfdkj shgjkfdshg fdkjsg hd</p> <input id="Button2" type="button" value="Print" onclick="return Button2_onclick()"/> </ContentTemplate> </telerik:RadWindow> </div> </form> </body></html>Thank you for your time,
Sébastien