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

RadWindow inside RadWindow.

3 Answers 106 Views
Window
This is a migrated thread and some comments may be shown as answers.
Harish
Top achievements
Rank 1
Harish asked on 02 Jul 2015, 08:20 AM

Hi All,

I have used the RadWindow in my code for showing data into pop up. I have used the RadGrid in the RadWindow.

Now I want to popup another RadWindow popup.

Can anyone please tell me how to use RadWindow inside RadWindow.

 Thanks,

Harish Patil

3 Answers, 1 is accepted

Sort by
0
Vessy
Telerik team
answered on 06 Jul 2015, 03:34 PM
Hi Harish,

I believe the information in the following help article will help you in implementing the desired scenario: How to Open a RadWindow from Within a RadWindow

Please, take a look at it and let me know in case any further assistance on this matter will be needed.

Regards,
Vessy
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Maher
Top achievements
Rank 1
answered on 23 Jul 2015, 08:27 AM

hi first i will post the answer

try that demo

http://demos.telerik.com/aspnet-ajax/window/examples/dialogreturnvalue/defaultcs.aspx

Code

Main Page you will have two windows inside one window manager

  <telerik:RadWindowManager ID="RadWindowManager1" runat="server" EnableShadow="true">
            <Windows>
                <telerik:RadWindow ID="UserListDialog" runat="server" Title="Editing record" Height="320px"
                    Width="310px" Left="150px" ReloadOnShow="true" ShowContentDuringLoad="false"
                    Modal="true">
                </telerik:RadWindow>
                 
                <telerik:RadWindow ID="RadWindow1" runat="server" Title="Search" Height="320px"
                    Width="310px" Left="150px" ReloadOnShow="true" ShowContentDuringLoad="false"
                    Modal="true">
                </telerik:RadWindow>
            </Windows>
        </telerik:RadWindowManager>​​

code to open the first window from the main

  function ShowEditForm() {     
window.radopen("first.aspx", "UserListDialog", 1000, 800,30,30);
                return false;
            }​

in the second page trans.aspx it is a little bit different

use this function to get the window

   function GetRadWindow() {
                var oWindow = null;
                if (window.radWindow) oWindow = window.radWindow;
                else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow;
                return oWindow;
            }

this to open the second one

function openWin2() {
                var parentPage = GetRadWindow().BrowserWindow;
                var parentRadWindowManager = parentPage.GetRadWindowManager();
                window.setTimeout(function () {
                    parentRadWindowManager.open("Second.aspx", "RadWindow1", 400, 400, 30, 30);
                }, 0);
            }
        

now i post a question

in second .aspx(the second rad window) i built a datatable that i need to send to first .aspx(the first rad window)

i might think to put it on session

according to this post

http://www.telerik.com/forums/catching-close-event-server-side

JS:
function OnClientClose(sender, args)
{
 var ajaxManager = $find("<%= RadAjaxManager1.ClientID %>").ajaxRequest("Close") ;
}
C#:
protected void RadAjaxManager1_AjaxRequest(object sender, Telerik.Web.UI.AjaxRequestEventArgs e)
{
  if (e.Argument == "Close")
  {//you code Put the session
  }
}

this code will be in the main page or first .aspx ot the main since that the ajaxmanager on main

how to open the datatable (or the session on first.aspx)

 

thanks

0
Vessy
Telerik team
answered on 28 Jul 2015, 07:13 AM
Hi Maher,

If I understand the scenario properly, you have two RadWindows on a page, loading their content from two external pages and you want to retrieve information from the one window to the other. If so, You can pass parameters between the Windows. Here is the help article and demo which explains the same:
Using RadWindow as a Dialog.
Window / Returning Values from a Dialog.
Call a Function from a RadWindow in Another RadWindow

Regards,
Vessy
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
Window
Asked by
Harish
Top achievements
Rank 1
Answers by
Vessy
Telerik team
Maher
Top achievements
Rank 1
Share this question
or