RadWindowManagers and UserControls

2 posts, 1 answers
  1. Mohamed Salah Al-Din
    Mohamed Salah Al-Din avatar
    29 posts
    Member since:
    Aug 2009

    Posted 07 Feb 2010 Link to this post

    Dear Sir,
        As you noticed in the thread title i am writing RadWindowManagers, i will descripe the following scenario:
    one aspx page that contains one RadTabStrip and one RadMultiPage, inside each RadPageView we have one UserControl, inside each UserControl we have RadWindowManager and at least two RadWindow. i was having a problem with a script:

    var manager = GetRadWindowManager();  
    // txtShowWindow is the id of a textarea on the page  
    var window1 = manager.getWindowByName('rwMap');  
    var MapInput =  $find('<%=txt_Location.ClientID%>');  
    var MapInputValue = MapInput.get_value();  
    var Latval = 0;  
    var Longval = 0;  
    if (MapInputValue.length > 0)  
    Latval = MapInputValue.split(',')[0];  
    Longval = MapInputValue.split(',')[1];  
    window1.setUrl('Map.aspx?Lat=' + Latval + '&Long=' + Longval);  

    which is in the UserControl, i thought the problem was the [manager.getWindowByName('rwMap')] part but i investigat the problem, and found that the RadWindowManager in the first RadPageView is the only accessable even if i am in the second Tab, the second RadWindowManager is not accessable, that's why the function was returning null when i was trying to get the RadWindow.
  2. Answer
    Georgi Tunev
    Georgi Tunev avatar
    7207 posts

    Posted 11 Feb 2010 Link to this post

    Hello Mohamed,

    Try using $find() to get a reference to the RadWindowManager - GetRadWindowManager() will always get the manager that is last rendered on the page.

    Kind regards,
    Georgi Tunev
    the Telerik team

    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
    Follow the status of features or bugs in PITS and vote for them to affect their priority.
Back to Top