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

Access WindowManager at popupWindow

1 Answer 101 Views
Window
This is a migrated thread and some comments may be shown as answers.
Andrew
Top achievements
Rank 1
Andrew asked on 18 Aug 2010, 07:42 AM
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.


1 Answer, 1 is accepted

Sort by
0
Georgi Tunev
Telerik team
answered on 20 Aug 2010, 12:19 PM
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
Tags
Window
Asked by
Andrew
Top achievements
Rank 1
Answers by
Georgi Tunev
Telerik team
Share this question
or