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

RadWindowManagers and UserControls

1 Answer 50 Views
Window
This is a migrated thread and some comments may be shown as answers.
Mohamed Salah Al-Din
Top achievements
Rank 1
Mohamed Salah Al-Din asked on 07 Feb 2010, 10:25 AM
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);  
window1.show();  
window1.maximize(); 

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.

1 Answer, 1 is accepted

Sort by
0
Accepted
Georgi Tunev
Telerik team
answered on 11 Feb 2010, 07:54 AM
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.
Tags
Window
Asked by
Mohamed Salah Al-Din
Top achievements
Rank 1
Answers by
Georgi Tunev
Telerik team
Share this question
or