Open radwindow separately in another page or browser view

7 posts, 0 answers
  1. Antony
    Antony avatar
    32 posts
    Member since:
    Feb 2013

    Posted 31 Jul 2013 Link to this post

    Hi guys

    Using any tweak, can I open a Radwindow in another browser view? The scenario is I need to open a radwindow on clicking a link button, but the radwindow should be opened independently (it should not open in the current page containing my link button)

    Thanks
    Antony
  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 31 Jul 2013 Link to this post

    Hi Antony,

    RadWindow exists only in the context of the page in which it is created. It cannot leave the boundaries of the browser window and hence it cannot be opened independently. One suggestion is on the link button click you can open the browser's popup window (which can work independently) that contain an ASPX page having the RadWindow inside it and hence you can make use of the full customization ability as well as the rich client and server side API provided by RadWindow. Please have a look into the sample code I tried which works fine at my end.

    ASPX:
    <telerik:RadButton ID="RadButton1" runat="server" AutoPostBack="false" Text="Open Separate Window"
        OnClientClicked="openWindow">
    </telerik:RadButton>

    JavaScript:
    <script type="text/javascript">
        function openWindow(sender, args) {
            window.open("RadWindowPage.aspx", "WindowPopup", "scrollbars=1, width=400px, height=400px");
        }
    </script>

    ASPX: (RadWindowPage.aspx)
    <div>
        <telerik:RadWindow ID="RadWindow1" runat="server" Width="395px" Height="395px" VisibleTitlebar="false"
            VisibleStatusbar="false" VisibleOnPageLoad="true">
        </telerik:RadWindow>
    </div>

    Thanks,
    Shinu.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Antony
    Antony avatar
    32 posts
    Member since:
    Feb 2013

    Posted 01 Aug 2013 Link to this post

    Thanks shinu. Works great. It would be fine if its possible to maximize the window. The maximize button seems disabled. Why?
  5. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 02 Aug 2013 Link to this post

    Hi Antony,

    Try adding the resizable attribute to the window.open() and the maximize button will be enabled. Please check the updated JavaScript.

    JavaScript:
    <script type="text/javascript">
        function openWindow(sender, args) {
            window.open("RadWindowPage.aspx", "WindowPopup", "scrollbars=1, width=400px, height=400px, resizable");
        }
    </script>

    Thanks,
    Shinu.
  6. Antony
    Antony avatar
    32 posts
    Member since:
    Feb 2013

    Posted 04 Aug 2013 Link to this post

    Thanks. I have a similar requirement in one of the other pages where I need to make the popup window as modal like setting modal=true for radwindow. Please help shinu.
  7. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 05 Aug 2013 Link to this post

    Hi Antony,

    Instead of window.open(), you can try the window.showModalDialog() to open a browser popup window as a Modal. Please check the following sample.

    JavaScript:
    <script type="text/javascript">
        function openModalWindow(sender, args) {
            window.showModalDialog("http://www.telerik.com", "ModalWindow");
        }
    </script>

    Thanks,
    Shinu.
  8. Antony
    Antony avatar
    32 posts
    Member since:
    Feb 2013

    Posted 05 Aug 2013 Link to this post

    Thanks shinu.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017