Check documentation for the latest version of dhtmlxSuite onBeforeCheck DHTMLX Docs


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

boolean onBeforeCheck(string|number id,boolean state);
idstring|numberthe item's id
statebooleancurrent state of the checkbox
booleantrue to allow operation


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


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

Back to top