Completed
Last Updated: 17 Feb 2015 14:38 by ADMIN
ADMIN
Marin Bratanov
Created on: 12 Aug 2014 06:57
Category: Window
Type: Bug Report
1
FIX RadWindows with RenderMode=Lightweight take the skin of the last RadWindow in the markup regardless of their own Skin property
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>
1 comment
ADMIN
Misho
Posted on: 17 Feb 2015 14:38
The issue is resolved and the fix will be available in Q1 2015.