Access WindowManager at popupWindow

2 posts, 0 answers
  1. Andrew
    Andrew avatar
    10 posts
    Member since:
    Jul 2010

    Posted 18 Aug 2010 Link to this post

    Hello. I can't find RadWindowManager at Window, which open by another RadWindowManager.

    Ok. Main.aspx
    <telerik:RadWindowManager ID="winManager" ShowContentDuringLoad="false" VisibleStatusbar="false" ReloadOnShow="true" runat="server" Skin="Sunset" EnableShadow="true">
            <Windows>
                <telerik:RadWindow ID="RadWindow2" Width="600" Height="490" Modal="true" OnClientClose="OnClientClose"
                NavigateUrl="UserRights.aspx" runat="server" Behaviors="Close">
                </telerik:RadWindow>
            </Windows>
     
    </telerik:RadWindowManager>
    Main Page. At USerRights.aspx I need open another popup, and get data for USerRights page. So I've got at
    USerRights

    <telerik:RadWindowManager ID="winManager2" ShowContentDuringLoad="false" VisibleStatusbar="false"
            ReloadOnShow="true" runat="server" Skin="Sunset" EnableShadow="true">
                <Windows>
                    <telerik:RadWindow ID="RadWindow1" Behaviors="Close" OnClientClose="OnClientClose"
                        NavigateUrl="ChooseUsersGroups.aspx" runat="server" Height="500" Width="500">
                    </telerik:RadWindow>
                </Windows>
    </telerik:RadWindowManager>
    <button title="Add" id="btAdd" onclick="openSearchWindow(); return false;">Add</button>

    First windows opens well, but when I try open second window from the first with js:

    function openSearchWindow()
    {
                   var parentRadWindowManager = GetRadWindowManager();
                   var oWnd2 = parentRadWindowManager.open("ChooseUsersGroups.aspx", "RadWindow1");
                   window.setTimeout(function () {
                       oWnd2.setActive(true);
                   }, 0);
    }
    GetRadWindowManager() returns undefined. If i try find WindowManager from parentpage(as in your sample) all is ok. Why I can't get WindowManager at secondpage?

    Thanks.


  2. Georgi Tunev
    Admin
    Georgi Tunev avatar
    7207 posts

    Posted 20 Aug 2010 Link to this post

    Hello Andrew,

    Do you have RadWindowManager on the page where the openSearchWindow() function is? GetRadWindowManager() works in the context of the page where it was called and will return the manager object only if such manager exists on that page.


    Kind regards,
    Georgi Tunev
    the Telerik team
    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 Public Issue Tracking system and vote to affect the priority of the items
Back to Top