Check documentation for the latest version of dhtmlxSuite onOpenStart DHTMLX Docs


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

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


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


booleantrue - confirms opening


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


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