Check documentation for the latest version 6.0 of dhtmlxSuite onOpenStart DHTMLX Docs

onOpenStart

fires right when an item in the tree starts to open, but before this item has opened

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

Parameters

idstring|numberthe id of the node that will be opened
statenumberthe current open state of the item

Returns

booleantrue - confirms opening

Example

myTree.attachEvent("onOpenStart", function(id, state){
    // your code here
});

Details

The event is also available for "non-closable" nodes and for the nodes without the open/close functionality. In that case the function's result will be ignored.

The "state" parameter's values:

  • 0 - item has no child nodes
  • -1 - item is closed
  • 1 - item is opened
Back to top