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

Customizing RadWindow from ClientSide API

1 Answer 55 Views
Window
This is a migrated thread and some comments may be shown as answers.
Imran
Top achievements
Rank 1
Imran asked on 22 Jan 2009, 01:49 PM
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 window.here is my javascript that creates window.

function showEmailtoFriendWindow(ImageButton) {
        var oWnd = radopen("EmailToFriend.aspx", "EmailToFriendWin");
        oWnd.SetWidth(220);
        oWnd.SetHeight(200);
        var pos = GetTopLeftPosition(ImageButton);
        oWnd.moveTo(pos.x + parseInt(ImageButton.clientWidth), pos.y);
        oWnd.show();
    }
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.

Thanks

1 Answer, 1 is accepted

Sort by
0
Accepted
Svetlina Anati
Telerik team
answered on 23 Jan 2009, 01:51 PM
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);


Regards,
Svetlina
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Window
Asked by
Imran
Top achievements
Rank 1
Answers by
Svetlina Anati
Telerik team
Share this question
or