Hi,
I'm testing the new Auto Resize facility and so far, it has not been successful.
Above is the example test Javascript I used to open my RadWindow.
This is my page content where I have my RadWindows and my RadWindowManager.
When the RadWindow opens up, it does not resize by the content size eventhough I have set AutoSize to be true. I assumed it will do the work and resize itself but it didn't.
So I tried the old method that people said have been useful.
In my default page, I had this code as my javascript code.
And in my FareRules.aspx page, I had this Javascript
And on page's body Onload, I called resizeWindow method which seemed to work fine. On execution, the window seemed to resize based on the contents. However, the problem I had with that is that when I close to RadWindow and open it the 2nd time, the 2nd execution opens with the size of the 1st execution and then resizes. So if 1st execution had contents that was in the size of 800x600, then 2nd execution starts as 800x600 and then resizes to the 2nd execution's content which can be like 640x480. I want all the RadWindows to start with it's default small size and then expand to fit the content. Is it achievable?
Please let me know if I made any mistakes or if you require anymore info regarding this problem. I want to find a solution for this.
function openRadWin(id) { |
radopen("http://www.telerik.com", "radWindowFareRules"); |
} |
Above is the example test Javascript I used to open my RadWindow.
<telerik:RadWindowManager ID="radWindowManager" runat="server" AutoSize="True" |
Behavior="None" InitialBehavior="None" |
KeepInScreenBounds="True"> |
<Windows> |
<telerik:RadWindow |
id="radWindowFareRules" |
runat="server" |
showcontentduringload="false" |
title="Telerik RadWindow" Behavior="Close" AutoSize="true" |
KeepInScreenBounds="True" Modal="True" Overlay="True" |
VisibleStatusbar="False"> |
</telerik:RadWindow> |
</Windows> |
</telerik:RadWindowManager> |
This is my page content where I have my RadWindows and my RadWindowManager.
When the RadWindow opens up, it does not resize by the content size eventhough I have set AutoSize to be true. I assumed it will do the work and resize itself but it didn't.
So I tried the old method that people said have been useful.
In my default page, I had this code as my javascript code.
<script type="text/javascript"> |
function openRadWin(id) { |
radopen("FareRules.aspx?id=" + id, "radWindowFareRules"); |
} |
function GetRadWindow() { |
var oWindow = null; |
if (window.radWindow) oWindow = window.radWindow; |
else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow; |
return oWindow; |
} |
function resetWindow() { |
window.setTimeout(function() { |
var oWnd = GetRadWindow(); |
oWnd.SetWidth(300px); |
oWnd.SetHeight(200px); |
}, 400); |
} |
</script> |
And in my FareRules.aspx page, I had this Javascript
<script type="text/javascript"> |
function resizeWindow() { |
window.setTimeout(function() { |
var oWnd = GetRadWindow(); |
oWnd.SetWidth(document.body.scrollWidth + 20); |
oWnd.SetHeight(document.body.scrollHeight + 70); |
}, 400); |
} |
function GetRadWindow() |
{ |
var oWindow = null; |
if (window.radWindow) oWindow = window.radWindow; |
else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow; |
return oWindow; |
} |
</script> |
And on page's body Onload, I called resizeWindow method which seemed to work fine. On execution, the window seemed to resize based on the contents. However, the problem I had with that is that when I close to RadWindow and open it the 2nd time, the 2nd execution opens with the size of the 1st execution and then resizes. So if 1st execution had contents that was in the size of 800x600, then 2nd execution starts as 800x600 and then resizes to the 2nd execution's content which can be like 640x480. I want all the RadWindows to start with it's default small size and then expand to fit the content. Is it achievable?
Please let me know if I made any mistakes or if you require anymore info regarding this problem. I want to find a solution for this.