I’ve been pulling out my limited hair over this problem, so I need some help. I’m getting different RadWindow behavior, from the same code, depending on what control was used to invoke that code. In one case, the newly displayed window is modal, in another case it is not modal. But it’s the same code!
Here’s the setup:
The master page contains nothing related to RadWindow.
Top-level page includes the RadWindowManager declaration:
Width="600px" AutoSize="true" ReloadOnShow="true" Modal="true"
VisibleStatusbar="false" Behaviors="Resize, Close, Move" >
The top-level page opens the first RadWindow using this client code
This consistently works fine, gives me a modal window, and dims the entire browser window. This first RadWindow does NOT contain any declarations related to RadWindow. This first RadWindow opens a second RadWindow. I want the second RadWindow to also be modal. The code that I’m using to open the second RadWindow is:
oManager = GetRadWindow().GetWindowManager(); <<< GetRadWindow is from the demo
setTimeout(oWnd = function
oManager.open(p1, null); <<< null or “foo”, no difference
This code is pretty similar to the demo about opening a window from inside a window. The first RadWindow form calls this code either from an asp.net Button client click event or from a RadComboBox client SelectedIndexChanging event. Really, the same code!
The second RadWindow does not contain any declarations related to RadWindows.
When the button click opens the second RadWindow, it works great. The displayed window is modal, on top, and the browser window is dimmed an additional amount. When the same code is called from the RadComboBox SelectedIndexChanging event, the RadWindow is displayed with correct contents and size, however it is not modal (the first RadWindow is still active), it is initially displayed under the first RadWindow (should be on top), and the browser window is not dimmed an additional amount. The two RadWindows can then be closed in either order.
The only thing that is really different is button vs RadComboBox. Both controls are contained in cells of a DetailsView. Both controls are created dynamically. I’ve checked the intermediate values in the JS code and both get the same window ID and manager ID (using get_id() for both). The second-level RadWindow gets a new ID each time it is displayed, which is expected. This happens in both IE and FF.
This appears to be tied to the RadComboBox, since I get the same non-modal behavior from a different first RadWindow that has a RadComboBox in a RadGrid template column. Both of the first-level RadWindows open the same second RadWindow. The second RadWindow contains a dynamically generated RadGrid but has no knowledge (that I know about) of how it was invoked (both the button and the RadComboBox generate the same url).
Any ideas on how to always get the modal behavior?