Completed
Last Updated: 03 Sep 2015 10:34 by ADMIN
ADMIN
Marin Bratanov
Created on: 21 Aug 2013 09:29
Category: Window
Type: Bug Report
0
RadWindow opens with incorrect size when RenderMode=Lightweight
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>
(Total attached files size should be smaller than 20mb. Allowed extensions: .zip, .rar, .jpg, .png, .gif)
0 comments