Hi,
We are calling the autoSize method manually to resize the window in some cases after load so that it fits with content.
We had no problem with this when using Classic render mode, but when switching to Lighweight it doesn't decrease its width anymore!
See the following sample:
Content window:
When clicking the button the height of the window should be 200px instead of 300px, but it only gets a little bit larger...
If setting RenderMode="Classic" it does work as expected!
Regards
Andreas
We are calling the autoSize method manually to resize the window in some cases after load so that it fits with content.
We had no problem with this when using Classic render mode, but when switching to Lighweight it doesn't decrease its width anymore!
See the following sample:
<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="window.aspx.vb" Inherits="TestaTredjepartWeb.window" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<
html
xmlns
=
"http://www.w3.org/1999/xhtml"
>
<
head
runat
=
"server"
>
<
title
></
title
>
</
head
>
<
body
>
<
form
id
=
"form1"
runat
=
"server"
>
<
asp:ScriptManager
ID
=
"s"
runat
=
"server"
>
</
asp:ScriptManager
>
<
div
>
<
telerik:RadWindowManager
ID
=
"RadWindowManager1"
runat
=
"server"
>
<
Windows
>
<
telerik:RadWindow
ID
=
"RadWindow1"
runat
=
"server"
VisibleOnPageLoad
=
"true"
AutoSize
=
"true"
RenderMode
=
"Lightweight"
Title
=
"Hello"
NavigateUrl
=
"windowcontent.aspx"
VisibleStatusbar
=
"false"
>
</
telerik:RadWindow
>
</
Windows
>
</
telerik:RadWindowManager
>
</
div
>
</
form
>
</
body
>
</
html
>
Content window:
<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="windowcontent.aspx.vb" Inherits="TestaTredjepartWeb.windowcontent" %>
<!DOCTYPE html>
<
html
xmlns
=
"http://www.w3.org/1999/xhtml"
>
<
head
runat
=
"server"
>
<
title
>This is the title</
title
>
<
style
>
html, body, form
{
padding: 0px;
margin: 0px;
overflow: hidden;
}
</
style
>
</
head
>
<
body
>
<
form
id
=
"form1"
runat
=
"server"
>
<
asp:ScriptManager
ID
=
"s"
runat
=
"server"
>
</
asp:ScriptManager
>
<
div
id
=
"div"
style
=
"background-color: red; height: 300px; width: 300px"
>
test
<
asp:Button
ID
=
"btn"
runat
=
"server"
OnClientClick
=
"$get('div').style.height = '200px'; window.top.GetRadWindowManager().getActiveWindow().autoSize(); return false;"
/>
</
div
>
</
form
>
</
body
>
</
html
>
When clicking the button the height of the window should be 200px instead of 300px, but it only gets a little bit larger...
If setting RenderMode="Classic" it does work as expected!
Regards
Andreas