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

RADWindow Skin

1 Answer 82 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
juststarting
Top achievements
Rank 2
juststarting asked on 17 Feb 2014, 11:14 AM
Hi,

I have a MasterPage that opens a RADWindow in Model Window. Then when the user click on a new button in the RadWindow, it opens another RadWindow on top with no problem. However I can not set the skin of the 2nd RADWindow.

function GetRadWindow() {
    var oWindow = null;
    if (window.radWindow) oWindow = window.radWindow; //Will work in Moz in all cases, including clasic dialog
    else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow; //IE (and Moz az well)
    return oWindow;
}
function NewStatus() {
    var oManager = GetRadWindow().get_windowManager();
    setTimeout(function () {
        var winId = "Win" + Math.random().toString();
        var winPage = "AddStatus.aspx" + winId;
        var oNew = oManager.open("", "Window2");
        oNew.setUrl(winPage);
        oNew.SetSize(750, 550);
        oNew.set_visibleStatusbar(false);
        oNew.set_title("Status Screen");
        oNew.Skin = "Forest";
        oNew.set_keepInScreenBounds(true);
        oNew.set_enableShadow(true);
        oNew.set_destroyOnClose(true);
        oNew.set_animation(Telerik.Web.UI.WindowAnimation.Slide);
        oNew.set_initialBehaviors(Telerik.Web.UI.WindowBehaviors.None);
        oNew.set_behaviors(Telerik.Web.UI.WindowBehaviors.Close);
        oNew.add_close(OnClientCloseHandler);
        oNew.setActive(true);
        oNew.set_modal(true);
        oNew.Show();
    }, 0);
}

Am I missing something? What is the correct way of getting the result needed ? 

1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 18 Feb 2014, 04:08 AM
Hi,

Skins cannot be changed from the client side because skins are taken from the server side. Such situation we suggest to declare several RadWindows with different skins on the page and to open the corresponding window when needed.

Thanks,
Shinu.
Tags
Ajax
Asked by
juststarting
Top achievements
Rank 2
Answers by
Shinu
Top achievements
Rank 2
Share this question
or