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

How to remove_close All event handlers

1 Answer 154 Views
Window
This is a migrated thread and some comments may be shown as answers.
Golf -
Top achievements
Rank 1
Golf - asked on 22 Jul 2009, 10:10 AM

var

 

oWnd = radopen("Dialog1.aspx", "RadWindow1");

oWnd.remove_close(ClosingFn);
...
...

But I want to Clare clear_close   
Exp
    oWnd.clear_close();    Or   oWnd.remove_close(ALL);

 

1 Answer, 1 is accepted

Sort by
0
Fiko
Telerik team
answered on 27 Jul 2009, 12:53 PM
Hello Golf -,

This can be done by using the methods in the MS AJAX's library. You could get the attached close handlers to the RadWindow object and remove them as follow:

// Removes all close handlers 
function removeAllCloseHandlers(oWindow) 
    var attachedCloseHandlers = oWindow.get_events()._getEvent("close"); // Get all close handlers ; 
    while (attachedCloseHandlers.length > 0) 
    { 
        oWindow.remove_close(attachedCloseHandlers[0]); 
    } 

I hope this helps.

All the best,
Fiko
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
Window
Asked by
Golf -
Top achievements
Rank 1
Answers by
Fiko
Telerik team
Share this question
or