onBeforeCheck

fires before an item's checkbox is checked/unchecked, cancelable

boolean onBeforeCheck(string|number id,boolean state){ ... };

Parameters

idstring|numberthe item's id
statebooleancurrent state of the checkbox

Returns

booleantrue to allow operation

Example

myTreeView.attachEvent("onBeforeCheck", function(id, state){
    // your code here
    return true;
});

Details

the event is blockable: returning false will block the checkbox's checking

Back to top