The attachEvent method can be used to add an event handler to any of the available events. The method should to be called with the following parameters:
function doSome() {
// your code here
}
myTreeView.attachEvent("onSomeEvent", doSome);
Several handlers can be attached to one and the same event and all of them will be executed.
The names of the events are case-insensitive.
There is a simple way of removing an event handler:
// attach event
var eventId = myTreeView.attachEvent("onSomeEvent", doSome);
// detach event
myTreeView.detachEvent(eventId);
You can find the full list of events in the TreeView API.
Back to top