Hi.
I need to achieve method to autosize radwindow when content inside radwindow increases. The way im doing as follow below does not work for me. Any one that can help me out?
Using: Version: 2010, 2, 713, 35
This is how im opening radwindow:
GalleryPage.aspx
<telerik:RadWindowManager ID="RadWindowManager1" runat="server"
Skin="Black" Modal="true" EnableShadow="true"
DestroyOnClose="true" AutoSize="true"
VisibleStatusbar="false" ShowContentDuringLoad="false">
</telerik:RadWindowManager>
.......
<asp:LinkButton id="showImageFromThumbnail2" runat="server" OnClientClick='<%# "window.radopen(\"GalleryImage.aspx?id=" + DataBinder.Eval(Container.DataItem,"GalleryId") + "\",\"GalleryWindow\"); return false;" %>'>
GalleryImage.aspx
<script language="javascript" type="text/javascript">
var galleryWin = null;
function pageLoad() {
galleryWin = $find("<%= RadWindowManager1.ClientID %>");
}
function toggleExpand(clickedLink) {
$telerik.$('#hiddenContent').toggle();
//change link's text
if ($telerik.$(clickedLink).text() == "Show more") {
$telerik.$(clickedLink).text("Show less").addClass("showLess");
}
else {
$telerik.$(clickedLink).text("Show more").removeClass("showLess");
}
//autosize the gallery window
galleryWin.autoSize(true);
}
</script>
.......
<div id="hiddenContent" style="display:none; padding:10px;">
<div style="width:100%; background-color:#ff0000;">
<h2>Title</h2>
<p>info..</p>
</div>
</div>
<a id="toggleLink" href="javascript:void(0);" class="toggleLink" onclick="toggleExpand(this); return false;">Show more</a>
I need to achieve method to autosize radwindow when content inside radwindow increases. The way im doing as follow below does not work for me. Any one that can help me out?
Using: Version: 2010, 2, 713, 35
This is how im opening radwindow:
GalleryPage.aspx
<telerik:RadWindowManager ID="RadWindowManager1" runat="server"
Skin="Black" Modal="true" EnableShadow="true"
DestroyOnClose="true" AutoSize="true"
VisibleStatusbar="false" ShowContentDuringLoad="false">
</telerik:RadWindowManager>
.......
<asp:LinkButton id="showImageFromThumbnail2" runat="server" OnClientClick='<%# "window.radopen(\"GalleryImage.aspx?id=" + DataBinder.Eval(Container.DataItem,"GalleryId") + "\",\"GalleryWindow\"); return false;" %>'>
GalleryImage.aspx
<script language="javascript" type="text/javascript">
var galleryWin = null;
function pageLoad() {
galleryWin = $find("<%= RadWindowManager1.ClientID %>");
}
function toggleExpand(clickedLink) {
$telerik.$('#hiddenContent').toggle();
//change link's text
if ($telerik.$(clickedLink).text() == "Show more") {
$telerik.$(clickedLink).text("Show less").addClass("showLess");
}
else {
$telerik.$(clickedLink).text("Show more").removeClass("showLess");
}
//autosize the gallery window
galleryWin.autoSize(true);
}
</script>
.......
<div id="hiddenContent" style="display:none; padding:10px;">
<div style="width:100%; background-color:#ff0000;">
<h2>Title</h2>
<p>info..</p>
</div>
</div>
<a id="toggleLink" href="javascript:void(0);" class="toggleLink" onclick="toggleExpand(this); return false;">Show more</a>