After upgrading Telerik to the latest version, it appears that RadWindows with a Lightweight render mode do not render at dimensions specified in the <telerik:RadWindow> tag. While I was using a custom skin when I started testing, I ultimately removed all skins from the window (that is, I set "EnableEmbeddedSkins" to false and then did not specify a skin) in an attempt to narrow down the problem.
With no skin at all, a RadWindow with attributes of "Width='338px' and Height='309px'" rendered with the correct height, but was 368 pixels wide. Incidentally, the inline style applied to the RadWindowWrapper in the output HTML markup was 352 pixels, which rules out a CSS issue because this value is also wrong.
Next, I tried removing the dimension attributes, meaning that the window should have rendered with the default dimensions of 300 pixels by 300 pixels. Instead, it rendered at 330 x 300 pixels, with an inline height of 314 pixels. So the dimensions are, at least, consistently wrong.
Why is this happening, and what can I do to get a RadWindow to render at the dimensions set in its attributes?
On a related note: the aforementioned custom skin I was using when I started test has a "padding:0;" applied to the RadWindow, because I do not want the window to have any borders. With that styling applied, the height of the RadWindow also does not match the height set in the RadWindow's attribute. I assume these problems are related.
8 Answers, 1 is accepted
The window in lightweight renders the proper dimensions set:
ASPX:
<
telerik:RadWindow
ID
=
"RadWindow1"
runat
=
"server"
VisibleOnPageLoad
=
"true"
RenderMode
=
"Lightweight"
Width
=
"300px"
Height
=
"300px"
></
telerik:RadWindow
>
You should also take into consideration that dimensions include borders and other window elements as well. You can examine the computed styles for details - http://screencast.com/t/hHgHst05NkD8
Regards,
Danail Vasilev
Telerik
Thank you for responding Danail.
Using the simple ASPX you posted, I was able to duplicate your correct results. However, as I slowly added properties to bring the window closer to my original, I found that the issue I described in my original post only occurs when the window is modal. That is, it has an attribute of Modal="true". When modal is true, I think the window in your example would render at 326 x 300 instead of 300 x 300. Can you confirm this, please?
I confirm this is an issue with the window's dimensions in lightweight when modal. The issue, however, will be fixed for the upcoming Q2 2015 SP2 release, scheduled for the end of this month. For the time being you can try the latest internal build.
Regards,
Danail Vasilev
Telerik
Apologize for the misleading information - the issue with the wrongly window's dimensions in lightweight render mode will be fixed for the Q3 2015 release, scheduled for the end of this September. The issue is logged here (http://feedback.telerik.com/Project/108/Feedback/Details/56242), its status is set to completed and its release is Q3 2015. You may also find useful the possible workarounds in the item.
Regards,
Danail Vasilev
Telerik
Hi! ...
I'm using the version 2016.1.113.45 and every time I open a window in lightweight mode, the window width becomes 2 px smaller ... it doesn't matter modal=true or false. It's the same behavior. In classic mode every works like expected. Please see attached samples!
Can you confirm this issue?
Thank you!
Peter
I wasn't able to reproduce the mentioned issue. The window's dimensions are properly set on my side with the Lightweight render mode - http://screencast.com/t/uuM7mLT9SfCP
ASPX:
<
form
id
=
"form1"
runat
=
"server"
>
<
telerik:RadScriptManager
ID
=
"RadScriptManager1"
runat
=
"server"
></
telerik:RadScriptManager
>
<
telerik:RadSkinManager
ID
=
"RadSkinManager1"
runat
=
"server"
Skin
=
"Web20"
></
telerik:RadSkinManager
>
<
telerik:RadWindow
ID
=
"RadWindow1"
runat
=
"server"
Width
=
"620px"
Height
=
"565px"
VisibleOnPageLoad
=
"true"
RenderMode
=
"Lightweight"
></
telerik:RadWindow
>
</
form
>
Could you please provide us the exact code that reproduce the issue, so that I can investigate it further?
You can also try upgrading to the latest official version - 2016.1.225.
Regards,
Danail Vasilev
Telerik