expand collaps

## dhtmlXTreeObject object API

### Handlers

setDragHandler(func) [Depricated]
set function called when drag-and-drop event occured
Depricated! - use grid.attachEvent("onDrag",func); instead
Event Name:onDrag
Event occured after item was dragged and droped on another item, but before item moving processed.
- ID of source item
- ID of target item
- if node droped as sibling then contain id of item before whitch source node will be inserted
- source Tree object
- target Tree object
Event returns:true - confirm drag-and-drop; false - deny drag-and-drop;
File required:dhtmlxtree.js
- aFunc - event handling function
setDropHandler(...) [Professional] [Depricated]
set function called after drag-and-drap event occured
Depricated! - use grid.attachEvent("onDrop",func); instead
Event Name:onDrop
Event raised after drag-and-drop processed. Event also raised while programmatic moving nodes.
- ID of source item (ID after inserting in tree, my be not equal to initial ID)
- ID of target item
- if node droped as sibling then contain id of item before whitch source node will be inserted
- source Tree object
- target Tree object
File required:dhtmlxtree.js
setOnCheckHandler(func) [Depricated]
set function called before checkbox checked/unchecked
Depricated! - use grid.attachEvent("onCheck",func); instead
Event Name:onCheck
Event raised immideatly after item in tree was checked/unchecked.
- ID of item which will be checked/unchecked
- Current checkbox state. 1 - item checked, 0 - item unchecked.
File required:dhtmlxtree.js
- func - event handling function
setOnClickHandler(func) [Depricated]
set function called when tree node clicked, also can be forced to call from API
Depricated! - use grid.attachEvent("onClick",func); instead
Event Name:onClick
Event raised immideatly after text part of item in tree was clicked, but after default onClick functionality was processed.
- ID of clicked item
- ID of previously selected item
File required:dhtmlxtree.js
- func - event handling function
setOnDblClickHandler(func) [Depricated]
set function called when tree node double clicked
Depricated! - use grid.attachEvent("onDblClick",func); instead
Event Name:onDblClick
Event raised immideatly after item in tree was doubleclicked, before default onDblClick functionality was processed.
- ID of item which was doubleclicked
Event returns:true - confirm opening/closing; false - deny opening/closing;
File required:dhtmlxtree.js
- func - event handling function
setOnLoadingEnd(...) [Professional] [Depricated]
set function called after xml loading/parsing ended
Depricated! - use grid.attachEvent("onXLE",func); instead
Event Name:onXLE
event fired simultaneously with ending XML parsing, new items already available in tree
- tree object
- last parsed parent id
File required:dhtmlxtree.js
setOnLoadingStart(...) [Professional] [Depricated]
set function called before xml loading/parsing started
Depricated! - use grid.attachEvent("onXLS",func); instead
Event Name:onXLS
event fired simultaneously with starting XML parsing
- tree object
- item id, for which xml loaded
File required:dhtmlxtree.js
setOnMouseInHandler(func) [Depricated]
set function called when mouse is over tree node
Depricated! - use grid.attachEvent("onMouseIn",func); instead
Event Name:onMouseIn
Event raised immideatly after mouse hovered over item
- ID of item
File required:dhtmlxtree.js
- func - event handling function
setOnMouseOutHandler(func) [Depricated]
set function called when mouse is out of tree node
Depricated! - use grid.attachEvent("onMouseOut",func); instead
Event Name:onMouseOut
Event raised immideatly after mouse moved out of item
- ID of clicked item
File required:dhtmlxtree.js
- func - event handling function
setOnOpenEndHandler(func) [Depricated]
set function called after tree node opened/closed
Depricated! - use grid.attachEvent("onOpenEnd",func); instead
Event Name:onOpenEnd
Event raised immideatly after item in tree got command to open/close , and before item was opened//closed. Event also raised for unclosable nodes and nodes without open/close functionality - in that case result of function will be ignored.
- ID of node which will be opened/closed
- Current open state of tree item. 0 - item has not childs, -1 - item closed, 1 - item opened.
File required:dhtmlxtree.js
- func - event handling function
setOnOpenStartHandler(func) [Depricated]
set function called before tree node opened/closed
Depricated! - use grid.attachEvent("onOpenStart",func); instead
Event Name:onOpenStart
Event raised immideatly after item in tree got command to open/close , and before item was opened//closed. Event also raised for unclosable nodes and nodes without open/close functionality - in that case result of function will be ignored.
- ID of node which will be opened/closed
- Current open state of tree item. 0 - item has not childs, -1 - item closed, 1 - item opened.
Event returns:true - confirm opening/closing; false - deny opening/closing;
File required:dhtmlxtree.js
- func - event handling function
setOnRightClickHandler(func) [Depricated]
set function called when tree node selected
Depricated! - use grid.attachEvent("onRightClick",func); instead
Event Name:onRightClick
Event occured after right mouse button was clicked.
- (string) ID of clicked item
- (object) event object
File required:dhtmlxtree.js
- (function) func - event handling function
setOnSelectStateChange(func) [Depricated]
set function called when tree node selected or unselected, include any select change caused by any functionality
Depricated! - use grid.attachEvent("onSelect",func); instead
Event Name:onSelect
Event raised immideatly after selection in tree was changed
- selected item ID ( list of IDs in case of multiselection)
File required:dhtmlxtree.js
- func - event handling function