DHTMLX Docs & Samples Explorer

onCheck Event

This event occurs when option checkbox is clicked. onCheck event passes the following parameters:

  • value - option value;
  • state - checkbox state (true/false);
          combo.attachEvent("onCheck", function(value,state){});  
 

This event returns: true - confirms changing checkbox state; false - denies:

        combo.attachEvent("onCheck",function(value,state){
            if (value==2) return false;        
            return true;                                                           
        })
 

Of course, it is possible to use any other kind of check here that will return true to allow changing state and false to deny it.