DHTMLX Docs & Samples Explorer

onBeforeChange

Parameters:

  • the object of the selected item (the new item);
  • the object of the currect item
  selector.attachEvent("onBeforeChange", function (selectedObject,previousObject){
       //any custom logic here
       return true;
  });

The event is blockable: if non-true value is returned from a custom method, the new item won't be selected.