Customizing RadWindow from ClientSide API

2 posts, 1 answers
  1. Imran
    Imran avatar
    19 posts
    Member since:
    Jan 2009

    Posted 22 Jan 2009 Link to this post

    I want to remove refresh,pin,maximize and minimize buttons from WindowTitle. I am not using Window Manager.I am using ClientSide javascript to invoke that is my javascript that creates window.

    function showEmailtoFriendWindow(ImageButton) {
            var oWnd = radopen("EmailToFriend.aspx", "EmailToFriendWin");
            var pos = GetTopLeftPosition(ImageButton);
            oWnd.moveTo(pos.x + parseInt(ImageButton.clientWidth), pos.y);
    function GetTopLeftPosition(element) {
            var left = 0;
            var top = 0;

            while (element.offsetParent) {
                left += element.offsetLeft;
                top += element.offsetTop;
                element = element.offsetParent;
            if (element.x) left = element.x;
            if (element.y) top = element.y;
            var oPos = new Object();
            oPos.x = left;
            oPos.y = top;
            return oPos;
    from here I want to remove those button through code.Kindly help me in this regard.

  2. Answer
    Svetlina Anati
    Svetlina Anati avatar
    2795 posts

    Posted 23 Jan 2009 Link to this post

    Hi Imran,

    You can dynamically set the desired behaviors for a RadWindow on the client by obtaining a reference to its client-side object and calling its set_behaviors method as explained here. For example if you want to have only the close button you should use the following code:

    oWnd.set_behaviors( Telerik.Web.UI.WindowBehaviors.Close);

    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Back to Top