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

Client callbacks not working with multiple RadWindowManagers on the page

2 Answers 188 Views
Window
This is a migrated thread and some comments may be shown as answers.
Jon
Top achievements
Rank 1
Jon asked on 16 Feb 2009, 04:37 PM
Hi,

I think I'm running into an issue where my client callback methods aren't being called when there are multiple RadWindowManagers on the page.  I have an environment set up where there are potentially multiple user controls on a page where more than one will need its own WindowManager.

A test page I have demonstrates the problem:
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server" /> 
         
        <telerik:RadWindowManager runat="server" ID="RadWindowManager1"
            <Windows> 
                <telerik:RadWindow runat="server" ID="rwOrders1" OnClientShow="rwOrders_ClientClose"
                </telerik:RadWindow> 
            </Windows> 
        </telerik:RadWindowManager> 
 
        <telerik:RadWindowManager runat="server" ID="RadWindowManager2"
            <Windows> 
                <telerik:RadWindow runat="server" ID="rwOrders2" OnClientShow="rwOrders_ClientClose"
                </telerik:RadWindow> 
            </Windows> 
        </telerik:RadWindowManager> 
         
        <script language="javascript" type="text/javascript"
            function rwOrders_ClientClose(oWnd) { 
                alert("IN CALLBACK!"); 
            } 
        </script>  
        <href="#" onclick="window.radopen('MyPage.aspx', 'rwOrders2');">New Order</a>      
 

It seems that when there are multiple windowmanagers on a single page, the first one found's Callbacks are the only ones that work.

Tests:
- As shown above, callback won't fire.
- Set WindowOpen to reference rwOrders1, callback will fire.
- Remove RadWindowManager1 and its window (and set RadOpen back to referencing rwOrders2), callback will fire.
- Add RadWindowManager1 and its window back, and move the rwOrders2 window to its WindowManager, and the callback will still fire.

Doing a google search it looks like this issue was identified and fixed back in 2006. However, I'm still seeing the same symptoms.  Is there a quick workaround for the issue or am I missing something?

Thanks!

2 Answers, 1 is accepted

Sort by
0
Georgi Tunev
Telerik team
answered on 18 Feb 2009, 03:47 PM
Hi Jon,

When having multiple managers on the same page, you need to have in mind the following:
  1. GetRadWindowManager, radopen, radalert, radconfirm and radprompt functions always use the RadWindowManager that is first rendered on the page.
  2. Every RadWindowManager "knows" about the RadWindows that are declared in its Windows collection only. If you use radopen and the RadWindow that you want to open is not in the first RadWindowManager, this manager will create a new RadWindow.
In scenarios like yours, I would suggest not to use radopen but to get a reference to the desired window by using $find() and then to call its show() method.


Best wishes,
Georgi Tunev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
chithuraj
Top achievements
Rank 1
answered on 06 Mar 2009, 11:52 AM
waste
Tags
Window
Asked by
Jon
Top achievements
Rank 1
Answers by
Georgi Tunev
Telerik team
chithuraj
Top achievements
Rank 1
Share this question
or