Ok, i know there is a big problem with the auto resize of radwindows but i think i'm very close to getting my version working.
I've followed the guides here from these threads:
http://demos.telerik.com/aspnet-ajax/window/examples/dialogreturnvalue/defaultcs.aspx
http://www.telerik.com/community/forums/aspnet-ajax/window/resize-radwindow-based-on-content-not-onload.aspx
http://www.telerik.com/community/forums/aspnet-ajax/window/resizing-problem-and-autoresize-option.aspx
http://www.telerik.com/community/forums/orm/general-discussions/to-resize-rad-window-on-the-change-of-the-size-of-control-on-it.aspx
http://www.telerik.com/community/forums/aspnet-ajax/window/best-way-to-resize-window-when-content-changes-via-javascript.aspx
But what is happening is that first my radwindow on chrome shows up very very small and then grows to the appropriate size. This kinda sucks but hey if it happens the first time i can deal with that. The problem is that every time i call "AdjustRadWidow" it does this behavior. This is unlike the demo's above.
Calling code block:
My javascript block: this is functionaly equivalent to the code above but i made changes so it works with my custom skin.
How can i fix this.
I've followed the guides here from these threads:
http://demos.telerik.com/aspnet-ajax/window/examples/dialogreturnvalue/defaultcs.aspx
http://www.telerik.com/community/forums/aspnet-ajax/window/resize-radwindow-based-on-content-not-onload.aspx
http://www.telerik.com/community/forums/aspnet-ajax/window/resizing-problem-and-autoresize-option.aspx
http://www.telerik.com/community/forums/orm/general-discussions/to-resize-rad-window-on-the-change-of-the-size-of-control-on-it.aspx
http://www.telerik.com/community/forums/aspnet-ajax/window/best-way-to-resize-window-when-content-changes-via-javascript.aspx
But what is happening is that first my radwindow on chrome shows up very very small and then grows to the appropriate size. This kinda sucks but hey if it happens the first time i can deal with that. The problem is that every time i call "AdjustRadWidow" it does this behavior. This is unlike the demo's above.
Calling code block:
<telerik:RadWindowManager ID="RadWindowManager1" Overlay="true" runat="server" Modal="true" EnableViewState="false" VisibleStatusbar="false" Behaviors="Close,Move,Resize" Skin="skr" EnableEmbeddedSkins="false" OnClientPageLoad="AdjustRadWidow" autoSize="true" ></telerik:RadWindowManager>My javascript block: this is functionaly equivalent to the code above but i made changes so it works with my custom skin.
function AdjustRadWidow() { try { var manager = GetRadWindowManager(); var oWindow = manager.GetActiveWindow(); } catch (err) { var oWindow = GetRadWindow(); } setTimeout(function () { oWindow.autoSize(true); if ($telerik.isChrome || $telerik.isSafari) ChromeSafariFix(oWindow); }, 500);}//fix for Chrome/Safari due to absolute positioned popup not counted as part of the content page layoutfunction ChromeSafariFix(oWindow) { var iframe = oWindow.get_contentFrame(); var body = jQuery('iframe[name=RadWindow1]').contents().find(".content"); if (typeof jQuery(body).html() === 'undefined') { body = jQuery('.content'); } setTimeout(function () { var height = jQuery(body)[0].scrollHeight + 275; var width = jQuery(body)[0].scrollWidth + 70; var iframeBounds = $telerik.getBounds(iframe); var heightDelta = height - iframeBounds.height; var widthDelta = width - iframeBounds.width; if (heightDelta > 0) oWindow.set_height(oWindow.get_height() + heightDelta); if (widthDelta > 0) oWindow.set_width(oWindow.get_width() + widthDelta); oWindow.center(); }, 310);}How can i fix this.