The problem with adding such an overlay is that it cannot be transparent, or it will not work. If it is added, the content of the main page will be invisible behind a modal popup. It can be implemented via an additional property (that will default to false) should the effect be acceptable to the developer. Add a vote and/or a comment in favor or against such an option. A possible solution is setting the visibility CSS attribute of the embedded elements to hidden with a JavaScript function attached to the OnClientBeforeShow event of the RadWindow, and reverting it to its initial value with the OnClientClose hander. To ease these elements' collection they are going to use the shouldBeDisabled CSS class for this example: function OnClientBeforeShow(sender, args) { if (sender.isModal()) { var elements = $telerik.$(".shouldBeDisabled"); var arrLength = elements.length; var element; for (var i = 0; i < arrLength; i+=1) { element = elements[i]; element.style.visibility = "hidden"; } } } function OnClientClose(sender, args) { if (sender.isModal()) { var elements = $telerik.$(".shouldBeDisabled"); var arrLength = elements.length; var element; for (var i = 0; i < arrLength; i += 1) { element = elements[i]; element.style.visibility = "initial"; } } }
When a RestrictionZone is used, under Chrome for iOS7, the first time an input inside a RadWindow is tapped it cannot get focus. This means that its onfocus event does not fire and the user cannot type in it even though the keyboard was shown. When another input is focused things start working properly. A way to avoid this is to remove the RestrictionZone property. You can also remove the restriction zone for mobile devices to include chrome function OnClientShow(sender, args) { if ($telerik.isTouchDevice) { sender.set_restrictionZoneID(""); } }
A function that is attached to this event is triggered on clicking the RadWindow's toolbar, even if it is already active.
Currently when external content is loaded in RadWindow, scollbars appear in the content and the control is dragged, the position of the scrollbars will be reset in IE10. The attached sample demonstrates a workaround for this issue.
It should be similar to the RadAjaxManager.GetCurrent(Page) method and return the first RadWindowManager instance on the page. Note that, unlike most other manager type controls there may be multiple RadWindowManagers on the page in a valid scenario.
This iframe element has an empty html tag that can cause issues with the Section 508 validation. Also, the iframe is not used so it does not need to be present in the markup at all. The following script added to the OnClientShow event of the RadWindowManager can remove this iframe: function OnClientShow(sender, args) { if (!sender._isPredefined) return; //check if it is a predefined dialog var frame = $telerik.$("iframe", sender.get_popupElement()); frame.remove(); }
When a RadWindow with RenderMode=Lightweight is shown the client-side equivalents of the Width and Height property change and the final dimensions of the popup are different than expected (larger if the popup is modal and smaller if not). These values should not change unless the set_width() or set_height() methods are called. Possible workarounds: - use RenderMode=Classic - try adding the following CSS rule div.RadWindow { padding: 0 6px 5px; } - use the following script together with the custom attributes in the markup: <telerik:RadWindow ID="m_printWindow" runat="server" RenderMode="Lightweight" Title="Print Settings" Width="180" Height="330" origWidth="180" origHeight="330" Behaviors="Close,Move" VisibleStatusbar="False"> <ContentTemplate> </ContentTemplate> </telerik:RadWindow> <asp:Button ID="Button1" Text="show Wnd" OnClientClick="showWnd(); return false;" runat="server" /> <script type="text/javascript"> function showWnd() { var wnd = $find("<%= m_printWindow.ClientID %>"); wnd.show(); var origWidth = wnd.get_element().getAttribute("origWidth"); var origHeight = wnd.get_element().getAttribute("origHeight"); wnd.setSize(origWidth, origHeight); wnd.center(); } </script> - try the following approach: <script type="text/javascript"> function OnClientShow(sender, args) { setTimeout(function () { sender.remove_show(OnClientShow); sender.set_modal(sender.get_element().getAttribute("ShouldBeModal")); var popupElem = sender.get_popupElement(); popupElem.style.width = sender.get_width() + "px"; popupElem.style.height = sender.get_height() + "px"; }, 0); } </script> <telerik:RadWindowManager RenderMode="LightWeight" ID="rwmVessel" DestroyOnClose="false" runat="server" Skin="WebBlue" OnClientShow="OnClientShow"> <Windows> <telerik:RadWindow RenderMode="LightWeight" AutoSize="false" ID="rwSendReceipt" ReloadOnShow="true" VisibleOnPageLoad="false" ShowContentDuringLoad="false" Title="Submission Receipt" runat="server" Skin="WebBlue" Behaviors="Close" VisibleStatusbar="false" Width="760" Height="475" ShouldBeModal="true" IconUrl="images/application_16.png"> </telerik:RadWindow> </Windows> </telerik:RadWindowManager>
The IE iframe module crashes, most likely because of the fact that events do not bubble to iframes.
We recently upgraded Telerik Dlls from 2011 to 2013, We are facing some issue 1: We are receiving compilation error The 'ClientCallBackFunction' property cannot be set declaratively. Code snippet is like <telerik:RadWindowManager Visible="true" Modal="true" Behavior="Close,Move" OffsetElementID="OffsetElement" ID="RWindow" runat="server" ClientCallBackFunction="ClientCallBackFunction" KeepInScreenBounds="true" ReloadOnShow="true"> ------- <telerik:RadCodeBlock> <script type="text/javascript"> function ClientCallBackFunction(sender, eventArgs) { if (eventArgs == ‘close it’) { window.location.href = 'Somepage.aspx'; } } </script> </telerik:RadCodeBlock> 2: In RadGrid’s OnItemCommand event code snippet e.Item.Cells[0..to n].Text always returns . Problem is this is live site and we need to fix these as soon as possible, looking forward for your response.
RadWindow is not displayed in mobile Chrome for iPad. A workaround is to set the Request Desktop Site Google Chrome option and the RadWindow should be available.
When the following RadWindow's propertis are set - AutoSize="true and RenderMode="Lightweight", the title's width of the RadWindow is 1px. The workaround is to use either RenderMode="Classic" or to override the title's width: <style type="text/css"> h6.rwTitle { width: 60% !important; } </style>
With the classic render mode this allows the developer to always position the popup according to a given target with a given offset. With the lightweight render mode the current bounds are returned instead of the offsets set by the developer. The following example always shows a RadWindow according to its offset element instead of only the first time: oWindow = $find("<%=winTest2.ClientID%>"); oWindow.show(); if (oWindow.get_offsetElementID()) { offsetElementBounds = $telerik.getBounds($get(oWindow.get_offsetElementID())); oWindow.moveTo(offsetElementBounds.x + oWindow.get_left(), offsetElementBounds.y + oWindow.get_top()); } This will not work as expected with the Lightweight render mode, because the popup will move additionally with its width and height.
The icon shown in the predefined dialogs can be changed with an argument that points to the new image as shown in this demo: http://demos.telerik.com/aspnet-ajax/window/examples/browserdialogboxes/defaultcs.aspx. This does not work with RenderMode=Lightweight
When a textbox is focused pressing enter will have the browser click the first available button in the form, which is, in this case the first command button from the RadWindow. If the only available command button is Close the RadWindow will close. Pressing enter with a textbox focused fires the next button on the form (you can see this with a simple textbox and button without anything special at all) and the page will be posted): <asp:TextBox ID="Textbox2" runat="server" /> <button onclick="alert(2);" id="testButton">test button</button> Since the RadWindow is the first thing rendered in a form the first button from its titlebar gets fired when the textbox is inside its ContentTemplate and enter is pressed. One of the most suitable workarounds is to add a Pin button and cancel the Pin command: function OnClientCommand(sender, args) { if (args.get_commandName() == "Pin") { args.set_cancel(true); $telerik.$(".rwPinButton", sender.get_popupElement()).blur(); } } where this is attached to the OnClientCommand event of the RadWindow: <telerik:RadWindow ID="RadWindow1" runat="server" OpenerElementID="Button1" RenderMode="Lightweight" Behaviors="Pin, Move, Close" OnClientCommand="OnClientCommand"> <ContentTemplate> <asp:TextBox ID="Textbox1" runat="server" /> </ContentTemplate> </telerik:RadWindow> <asp:Button ID="Button1" Text="open the RadWindow" runat="server" />
In IE only (not Chrome), beginning with the Q2 2013 release, an error is thrown on a RadWindow with the EnableShadow="true" property if .hide() is called on the window before it is made visible. This is new behavior with Q2 2013. The affected line is: }else{Sys.UI.DomElement.removeCssClass(this.container,"rwShadow"); where .container = nothing Current workarounds are: 1. Set EnableShadow="false" or 2. Make sure that radwindow.isVisible() === true prior to calling .hide()
A custom icon is replaced with the default icon in the LightWeight renderMode. For the time being the custom icon can be forced by using the OnClientShow event of the control: function OnClientShow(sender) { sender.set_iconUrl(sender.get_iconUrl()); }
Possible workarounds: 1) the following CSS rule: .rwExternalContent iframe { height: 100%; } OR 2) some JavaScript attached to the OnClientPageLoad event of the control: function OnClientPageLoad(sender) { sender.get_contentFrame().style.height = "100%"; }