A possible workaround is to remove the wrong skin-specific CSS class and add the correct one, for example: <telerik:RadWindow ID="first" runat="server" Skin="Silk" Height="200px" Width="200px" VisibleOnPageLoad="true" RenderMode="Lightweight" OnClientShow="applyProperSkinClass"> <ContentTemplate> <asp:Label runat="server" Text="Silk"></asp:Label> </ContentTemplate> </telerik:RadWindow> <telerik:RadWindow ID="second" runat="server" Skin="MetroTouch" Height="200px" Width="200px" VisibleOnPageLoad="true" RenderMode="Lightweight" OnClientShow="applyProperSkinClass"> <ContentTemplate> <asp:Label runat="server" Text="MetroTouch"></asp:Label> </ContentTemplate> </telerik:RadWindow> <script type="text/javascript"> function applyProperSkinClass(sender, args) { var classesArray = $telerik.$(sender.get_popupElement()).attr('class').split(' '); for (var i = 0; i < classesArray.length; i++) { if (classesArray[i].indexOf("RadWindow_") > -1) { $telerik.$(sender.get_popupElement()).removeClass(classesArray[i]); } } $telerik.$(sender.get_popupElement()).addClass("RadWindow_" + sender.get_skin()); var wndBounds = sender.getWindowBounds(); sender.setSize(wndBounds.width, wndBounds.height); } </script>
The desired effect can be achieved easily with CSS and this approach will even allow for finer tuning of the desired effect. The RadWindpw's ContentTemplate is a simple div element that has dimensions set in pixels by the RadWindow scripts, so you can control the way its contents flow just like any other generic div element on your page. Below follows an example. In case an external page is loaded in the RadWindow (e.g., via the NavigateUrl property), it will be loaded with an iframe that has its width and height set to 100% of the RadWIndow content area. Thus, it is up to the content page to control its scrolling. <%--A sample RadWindow declaration you can use for quick testing--%> <telerik:RadWindow ID="RadWindow1" runat="server" VisibleOnPageLoad="true"> <ContentTemplate> <div class="desiredOverflow"> Add your content here <div style="height: 1000px; width: 1000px; background-color: yellow;"> some dummy content so you can test out the overflow CSS rules behavior </div> </div> </ContentTemplate> </telerik:RadWindow> /* some sample CSS that you can use to control the scrolling behavior of your content */ .desiredOverflow { width: 100%; height: 100%; margin: 0; padding: 0; overflow: scroll; /* set the desired value here */ /* you can also use the other overflow rules for fine control */ overflow-x: hidden; /* set the desired value here */ overflow-y: scroll; /* set the desired value here */ }
Currently a page loaded through HTTPS will throw a warning that unsecure content is loaded if the IconUrl of the RadWindow is set with a relative path. This happens because the framework sets the URL without regard for the protocol. A workaround is to always use full urls (e.g. https://mysite.com/images/myIcon.jpg). If possible, RadWindow should check the protocol and fix the URL so that such warnings are not shown.
If you have multiple RadWindows opened only one has an active state (brigter colors for one). Closing it should activate the next one, so it is visually distinguishable, like MS Windows does. This should be the dialog that was either last opened, or was the last one active. With Lightweight RenderMode this does not happen and the other dialog remains in its inactive state. You can use the OnClientClose event to invoke the logic that activates the previous one: <telerik:RadWindow ID="MainWindow" runat="server" Modal="true" VisibleOnPageLoad="true" OnClientClose="activatePreviousWindow" RenderMode="Lightweight"> <ContentTemplate> <telerik:RadButton ID="radbtnOpenWin" runat="server" Text="Open Window" AutoPostBack="false" OnClientClicked="OpenWindow"> </telerik:RadButton> </ContentTemplate> </telerik:RadWindow> <telerik:RadWindow ID="ChildWindow" runat="server" Modal="true" OnClientClose="activatePreviousWindow" RenderMode="Lightweight"> <ContentTemplate> Child Window </ContentTemplate> </telerik:RadWindow> <script type="text/javascript"> function activatePreviousWindow(sender, args) { setTimeout(function () { sender._getWindowController().notifyWindowClosed(sender); }); } function OpenWindow(sender, args) { var window = $find("<%=ChildWindow.ClientID%>"); window.show(); } </script>
Currently, when a maximized RadWindow is closed the OnClientCommand event handler is called with a command "Restore" because when a maximized RadWindow is being closed it is first restored. A flag can be used to avoid it, see the attachment.
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.
A ShowOnTopWhenModal property would have the effect that any modal RadWindow (Modal=true) will increase greatly its z-index, just like it does when it is maximized. This property should take precedence over a maximized RadWindow (i.e. it should increase the z-index to more than 100 000). A possible workaround: <style> .topWindow { z-index: 100001 !important; } </style> for a markup of: <telerik:RadWindow ID="topWindow" runat="server" Width="500" Height="300" VisibleOnPageLoad="true" CssClass="topWindow" Modal="true"></telerik:RadWindow>
This will be an enumerator just like the Behaviors property. It should, however, list the behaviors that are not allowed for the control. The common use case is that the developer does not want his popup to be resizable, so he/she needs only DisabledBehaviors="Resize" instead of listing all others that should be allowed in the Behaviors property.
When the RenderMode of the RadWindowManager is set to "Auto", the embedded dialogs of the RadWindowManager do not have their resources loaded. For the time being the RenderMode must be set either to Classic or to Lightweight.
Opening a RadWindow containing a text input and selecting the input brings up the onboarrd keyboard. If you then zoom the input, the textbox becomes uneditable until the keyboard is manually hidden or the page is refreshed. I believe this is a focus issue, but cannot discern the details.
Unable to resolve the server's DNS address. this is error when I try to open telerik window in google chrome browser.
Unable to resolve the server's DNS address. this is error when I try to open telerik window in google chrome browser.
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()
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>
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
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%"; }
If the content page has a title RadWindow should set it for its own title, unless its Title property has been set explicitly. Since Q2 2013, when ShowContentDuringLoad=true (which is the default value) this does not happen. The second workaround is using the OnClientPageLoad event: function OnClientPageLoad(sender) { try { var pageTitle = sender.get_contentFrame().contentWindow.document.title; sender.set_title(sender.get_title() == "" ? pageTitle : sender.get_title()); } catch (err) { } } The try-catch block is used to catch errors in case the page is from another domain and the JavaScript same-origin policy is in effect. The event handler can also be attached to the RadWindow manager so that it will be used for all its RadWindows.
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()); }