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:
<telerik:RadWindowManager ID="RadWindowManager1" runat="server" Skin="Vista"
style="z-index:20000"
Width="600px" AutoSize="true" ReloadOnShow="true" Modal="true"
VisibleStatusbar="false" Behaviors="Resize, Close, Move" >
</telerik:RadWindowManager>
The top-level page opens the first RadWindow using this client code
var wnd = GetRadWindowManager().open(urlToOpen);
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:
var
oManager = GetRadWindow().GetWindowManager(); <<< GetRadWindow is from the demo
var oWnd;
setTimeout(oWnd = function (p1) {
return oManager.open(p1, null); <<< null or “foo”, no difference
}(urlToOpen), 0);
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?
Thanks,
DaveL
Dim mytextbox As RadTextBox = myRadGrid.MasterTableView.GetInsertItem().FindControl("txtBox")
thead{ display:table-header-group; } tbody{ display:table-row-group; }<tr class="rgGroupHeader"> <td class="rgGroupCol"><input type="submit" name="ctlrReportDesigner1$RadGrid1$ctl00$ctl04$ctl00" value=" " title="Collapse group" class="rgCollapse"></td><td colspan="3"><p>My Group Header</p></td> </tr>RadGrid1.AllowSorting = false; // Turn off column sorting when in Display modeRadGrid1.Columns[c1ASelectFile].Visible = false; // Hide "Select View" ColumnRadGrid1.Columns[c1APrintFile].Visible = false; // Hide "Print" ColumnRadGrid1.ClientSettings.Resizing.AllowColumnResize = false;RadGrid1.ClientSettings.Resizing.ResizeGridOnColumnResize = false;RadGrid1.ClientSettings.Resizing.ClipCellContentOnResize = false;RadGrid1.ClientSettings.AllowColumnsReorder = false;RadGrid1.CurrentPageIndex = iRecord; // Set document to display RadGrid1.PageSize = 1; // Set to one record per page when displaying documentRadGrid1.DataBind();Event code: 3005 Event message: An unhandled exception has occurred. Event time: 10/31/2011 3:43:14 PM Event time (UTC): 10/31/2011 10:43:14 PM Event ID: e83be8bc2dcb4fac96c0f6d752826fe9 Event sequence: 2063 Event occurrence: 5 Event detail code: 0 Application information: Application domain: /LM/W3SVC/1/Root/SpeechRecords-1-129645654292996087 Trust level: Full Application Virtual Path: /SpeechRecords Application Path: C:\WebSite\SpeechRecords\ Machine name: SVRTEONLINE Process information: Process ID: 97572 Process name: w3wp.exe Account name: NT AUTHORITY\NETWORK SERVICE Exception information: Exception type: ArgumentException Exception message: Invalid postback or callback argument. Event validation is enabled using <pages enableEventValidation="true"/> in configuration or <%@ Page EnableEventValidation="true" %> in a page. For security purposes, this feature verifies that arguments to postback or callback events originate from the server control that originally rendered them. If the data is valid and expected, use the ClientScriptManager.RegisterForEventValidation method in order to register the postback or callback data for validation. Request information: Request URL: http://192.168.0.238/SpeechRecords/Records.aspx Request path: /SpeechRecords/Records.aspx User host address: 192.168.1.131 User: Is authenticated: False Authentication Type: Thread account name: NT AUTHORITY\NETWORK SERVICE Thread information: Thread ID: 1 Thread account name: NT AUTHORITY\NETWORK SERVICE Is impersonating: False Stack trace: at System.Web.UI.ClientScriptManager.ValidateEvent(String uniqueId, String argument) at System.Web.UI.Control.ValidateEvent(String uniqueID, String eventArgument) at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) at System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) Custom event details: For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.