dhtmlXDataStore allows to handle different events using its event handling system. You can attach several handlers to the same event and detach them using two respective methods:
function my_handler(){ do_something(); }; data.attachEvent("onSomeEvent",my_handler);
var myevent = data.attachEvent("onSomeEvent",my_handler); ... data.detachEvent(myevent); // the unique id of the event handler