opening RadWindow form page loaded in another RadWindow

6 posts, 0 answers
  1. piotre6
    piotre6 avatar
    18 posts
    Member since:
    Apr 2011

    Posted 23 Jan 2012 Link to this post

    I have a page with agreement control, from that page I open a RadWindow with control to create or edit tenant details.
    Tenant control contain antoher RadWindow to edit adress details (as on attahed picture)
    How can I make RadWindow with address control to be above the tenant control?
  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 23 Jan 2012 Link to this post

    Hello,

    Take a look at the following demo.
    Grid / Window Editing

    -Shinu.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. piotre6
    piotre6 avatar
    18 posts
    Member since:
    Apr 2011

    Posted 23 Jan 2012 Link to this post

    scenario from link you posted has only one radwindow.
    it would be similar if you had another radwindow in editformcs.aspx
  5. Marin Bratanov
    Admin
    Marin Bratanov avatar
    3600 posts

    Posted 23 Jan 2012 Link to this post

    Hi,

    Please examine this help article: http://www.telerik.com/help/aspnet-ajax/window-programming-opening-from-within-dialog.html. It explains this exact scenario (that an object is confined in its parent frame) and how to avoid it (by opening the second RadWindow from the parent page). An alternative would be, just as Shinu suggested, to use the first RadWindwo with its ContentTemplate so that it does not create a new iframe. The difference between both modes is explained in this online demo.


    All the best,
    Marin
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
  6. piotre6
    piotre6 avatar
    18 posts
    Member since:
    Apr 2011

    Posted 23 Jan 2012 Link to this post

    I think the article could help however in code :

    var oBrowserWnd = GetRadWindow().BrowserWindow;
    setTimeout(function ()
    {
        oBrowserWnd.radopen("http://www.google.com", "NewWindow");
    }, 0);

    I get radopen is undefined.

    I cannot use contenttemplate due to multiple recurrency.
  7. piotre6
    piotre6 avatar
    18 posts
    Member since:
    Apr 2011

    Posted 23 Jan 2012 Link to this post

    Thank you for your suggestions, everything is fine now,
    Error "radopen is undefined" dissapeared after adding RadWindowManager.

    example if anybody needs it:
    test1.aspx

    <telerik:RadScriptBlock runat="server" ID="test1_script">
        <script type="text/javascript">
            var test1Wnd;
            function GetRadWindow() {
                var oWindow = null;
                if (window.radWindow)
                    oWindow = window.RadWindow; //Will work in Moz in all cases, including clasic dialog       
                else if (window.frameElement && window.frameElement.radWindow)
                    oWindow = window.frameElement.radWindow; //IE (and Moz as well)       
                return oWindow;
            }
            function open_fromTest1() {
                var oBrowserWindow = GetRadWindow();
                if (oBrowserWindow) oBrowserWindow = oBrowserWindow.BrowserWindow;
                if (oBrowserWindow == null) window.radopen("test2.aspx", "NewWindow1");
                else {
                    setTimeout(function () {
                        test1Wnd = oBrowserWindow.radopen("test2.aspx", "NewWindow1");
                    }, 0);
                }
            }
        </script>
    </telerik:RadScriptBlock>
    <div>
        TEST1
        <telerik:RadButton ID="RadButton1" Text="Open window" runat="server" 
            AutoPostBack="false" OnClientClicked="open_fromTest1" />
    </div>
    <telerik:RadWindowManager runat="server" ID="test1wndmgr"></telerik:RadWindowManager>

    test2.aspx
    <telerik:RadScriptBlock runat="server" ID="test1_script">
        <script type="text/javascript">
            var test2Wnd;
            function GetRadWindow() {
                var oWindow = null;
                if (window.radWindow)
                    oWindow = window.RadWindow; //Will work in Moz in all cases, including clasic dialog       
                else if (window.frameElement && window.frameElement.radWindow)
                    oWindow = window.frameElement.radWindow; //IE (and Moz as well)       
                return oWindow;
            }
            function open_fromTest2() {
                var oBrowserWindow = GetRadWindow();
                if (oBrowserWindow) oBrowserWindow = oBrowserWindow.BrowserWindow;
                if (oBrowserWindow == null) window.radopen("test3.aspx", "NewWindow2");
                else {
                    setTimeout(function () {
                        test1Wnd = oBrowserWindow.radopen("test3.aspx", "NewWindow2");
                    }, 0);
                }
            }
        </script>
    </telerik:RadScriptBlock>
    <div>
        TEST2
        <telerik:RadButton Text="Open window" runat="server" 
            AutoPostBack="false" OnClientClicked="open_fromTest2" />
    </div>
    <telerik:RadWindowManager runat="server" ID="test1wndmgr"></telerik:RadWindowManager>


    test3.aspx
    <div>
        TEST3
    </div>
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017