RADWindow Skin

2 posts, 0 answers
  1. juststarting
    juststarting avatar
    18 posts
    Member since:
    Jul 2012

    Posted 17 Feb 2014 Link to this post

    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 ? 
  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 17 Feb 2014 in reply to juststarting Link to this post

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top