This is a migrated thread and some comments may be shown as answers.

Resize RadWindow based on Page Content

1 Answer 125 Views
Window
This is a migrated thread and some comments may be shown as answers.
Taiseer
Top achievements
Rank 1
Taiseer asked on 18 Dec 2011, 10:35 PM

Dear all,

I’m trying to open the Rad window as modal and to be able to calculate the size of the opened window based on the opened page size i.e 400x400 and keep it centered. I don’t not want to use the autosize property.

Below is my Rad window setting as well the JS code which I use to recalculate the window size to fill the window.

Yourhelp is appreciated to open the modal window centered and in correct size based on the content page.
var oWnd = window.radopen(_EncryptedURL, "AdvancedForm");
oWnd.set_title(pageTitle);
resizeRadWindow(oWnd);
 
function resizeRadWindow(radWindow) {
 
    var windowHeight = $(window).height();
    var windowWidth = $(window).width();
 
    windowHeight = (windowHeight * 97.5) / 100;
    windowWidth = (windowWidth * 98) / 100;
 
    radWindow.moveTo(10, 10);
    radWindow.setSize(windowWidth, windowHeight);
}
<
rad:RadWindowManager ID="RadWindowManager1" runat="server">
        <Windows>
            <rad:RadWindow ID="AdvancedForm" runat="server" Modal="True" OpenerElementID="showDialog"
                InitialBehaviors="None" ShowContentDuringLoad="false" Behaviors="Close" OnClientClose="refreshScheduler"
                ReloadOnShow="True" Title="" NavigateUrl="" VisibleStatusbar="False">
            </rad:RadWindow>
        </Windows>
    </rad:RadWindowManager>

1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 19 Dec 2011, 06:16 AM
Hello,

Take a look into the following KB article.
Automatically resizing a RadWindow depending on its content

Thanks,
Princy.
Tags
Window
Asked by
Taiseer
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Share this question
or