How to Open a Pdf file in RadWindow using Javascript

3 posts, 1 answers
  1. A2H
    A2H avatar
    177 posts
    Member since:
    Mar 2010

    Posted 21 Nov 2012 Link to this post

    Hi All,
    I want to open a PDF file in a  Rad Window.I have gone through some forum replies and unfortunately in almost all replies the solution is to set the below 2 properties in RadWindow.
    VisibleOnPageLoad="true" ShowContentDuringLoad="true".

    If I set VisibleOnPageLoad property , as name suggests when the parent page loads RadWindow will also get displayed.
    My requirement is when the parant page loads,RadWindow should be hidden and when I click on a link Radwindow should open with the PDF.

    RadWindow Code:
      <telerik:RadWindow ID="TestWindow" runat="server" EnableEmbeddedSkins="True" Skin="Windows7" 
                       Modal="True" Width="900" Height="500" KeepInScreenBounds="True" Overlay="True" 
                       DestroyOnClose="false" VisibleStatusbar="false" VisibleTitlebar="true" 

    I am opening Radwindow using javascript code

     function showRadWnd() {
                             window.radopen("RadExport.pdf", "Test");
                            return false;
    Please help me.

  2. Answer
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 22 Nov 2012 Link to this post


    I was able to open a pdf file using the following code.
    <telerik:RadWindowManager ID="RadWindowManager1" runat="server">
                <telerik:RadWindow ID="RadWindow2"  runat="server">
     <asp:Button ID="Button2" runat="server" Text="open" OnClientClick="Open(); return false;" />

    function Open() {
       window.radopen("RadGridExport.pdf", "RadWindow2");
    As an alternative, you can also set the NavigateUrl property of the RadWindow.
    <telerik:RadWindow ID="RadWindow2" VisibleOnPageLoad="true" NavigateUrl="~/RadGridExport.pdf" runat="server"></telerik:RadWindow>

  3. A2H
    A2H avatar
    177 posts
    Member since:
    Mar 2010

    Posted 02 Dec 2012 Link to this post

    Hi Shinu,

    Setting Navigate url worked for me..

    Thanks for you help

Back to Top