This is a migrated thread and some comments may be shown as answers.

Open radwindow separately in another page or browser view

6 Answers 416 Views
Window
This is a migrated thread and some comments may be shown as answers.
Antony
Top achievements
Rank 1
Antony asked on 31 Jul 2013, 06:25 PM
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

6 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 01 Aug 2013, 04:02 AM
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.
0
Antony
Top achievements
Rank 1
answered on 02 Aug 2013, 04:34 AM
Thanks shinu. Works great. It would be fine if its possible to maximize the window. The maximize button seems disabled. Why?
0
Shinu
Top achievements
Rank 2
answered on 02 Aug 2013, 06:19 AM
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.
0
Antony
Top achievements
Rank 1
answered on 05 Aug 2013, 02:12 AM
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.
0
Shinu
Top achievements
Rank 2
answered on 05 Aug 2013, 05:23 AM
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.
0
Antony
Top achievements
Rank 1
answered on 05 Aug 2013, 06:32 PM
Thanks shinu.
Tags
Window
Asked by
Antony
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Antony
Top achievements
Rank 1
Share this question
or