getIndexById(itemId) retun node index in children collection by Id
Topic(s): File required:dhtmlxtree.js
itemId - node id
getItemColor(itemId) get node color (text color)
Topic(s): File required:dhtmlxtree.js
itemId - id of node
getItemIdByIndex(itemId,index) retun node id by index
Topic(s): File required:dhtmlxtree.js
itemId - parent node id
index - index of node, 0 based
getItemImage(...)
[Professional]
get url of item image
Topic(s): File required:dhtmlxtree.js
getItemParsingState(...)
[Professional]
get current parsing state of item
Topic(s): File required:dhtmlxtree.js Returns:1 - item already parsed; 0 - item not parsed yet; -1 - item in parsing process
getItemText(itemId) return node text
Topic(s): File required:dhtmlxtree.js
itemId - id of node
getItemTooltip(itemId) get item's tooltip
Topic(s): File required:dhtmlxtree.js
itemId - id of node
getLevel(itemId) get node level (position in hierarchy)
Topic(s): File required:dhtmlxtree.js
itemId - id of node
getOpenState(itemId) return open/close state
Topic(s): File required:dhtmlxtree.js
itemId - node id
getParentId(itemId) return parent item id
Topic(s): File required:dhtmlxtree.js
itemId - id of node
getSelectedItemId() retun selected item id
Topic(s): File required:dhtmlxtree.js
getSelectedItemText() retun selected node text
Topic(s): File required:dhtmlxtree.js
getSubItems(itemId) Returns the list of all subitems Ids from the next level of tree, separated by commas.
Topic(s): File required:dhtmlxtree.js
itemId - id of node
getUserData(itemId,name) get user data from target node
Topic(s): File required:dhtmlxtree.js
itemId - target node id
name - key for user data
getXMLState(...)
[Professional]
return current state of XML loading
Topic(s): File required:dhtmlxtree.js
hasChildren(itemId) return number of children
Topic(s): File required:dhtmlxtree.js
itemId - id of node
insertNewChild(parentId,itemId,itemText,itemActionHandler,image1,image2,image3,optionStr,children) create new node as a child to specified with parentId
Topic(s): File required:dhtmlxtree.js
parentId - parent node id
itemId - new node id
itemText - new node label
itemActionHandler - function fired on node select event (optional)
image1 - image for node without children; (optional)
image2 - image for closed node; (optional)
image3 - image for opened node (optional)
optionStr - options string (optional)
children - node children flag (for dynamical trees) (optional)
insertNewNext(itemId,newItemId,itemText,itemActionHandler,image1,image2,image3,optionStr,children) create new node next to specified
Topic(s): File required:dhtmlxtree.js
itemId - node id
newItemId - new node id
itemText - new node text
itemActionHandler - function fired on node select event (optional)
image1 - image for node without children; (optional)
image2 - image for closed node; (optional)
image3 - image for opened node (optional)
optionStr - options string (optional)
children - node children flag (for dynamical trees) (optional)
isItemChecked(itemId) get state of nodes's checkbox
Topic(s): File required:dhtmlxtree.js
itemId - target node id
isLocked(...)
[Professional]
get locked state of item
targetId - target Node in item_child and item_sibling mode
targetTree - used for moving between trees (optional)
openAllItems(itemId) expand target node and all sub nodes
Topic(s): File required:dhtmlxtree.js
itemId - node id
openAllItemsDynamic(...)
[Professional]
expand target node and all child nodes (same as openAllItems, but works in dynamic trees)
Topic(s): File required:dhtmlxtree_xw.js
openItem(itemId) expand node
Topic(s): File required:dhtmlxtree.js
itemId - id of node
openItemsDynamic(...)
[Professional]
expand list of nodes in dynamic tree (wait of loading of node before expanding next)
Topic(s): File required:dhtmlxtree_xw.js
openOnItemAdded(...)
[Professional]
configure if parent node will be expanded immideatly after child item added
Topic(s): File required:dhtmlxtree.js
preventIECaching(mode) prevent caching in IE by adding random value to URL string
Topic(s): File required:dhtmlxtree.js
mode - enable/disable random value ( disabled by default )
refreshItem(itemId) refresh tree branch from xml (XML with child nodes rerequested from server)
Topic(s): File required:dhtmlxtree.js
itemId - id of node, if not defined tree super root used.
refreshItems(...)
[Professional]
refresh specified tree nodes (get XML from server and updat only nodes included in itemIdList)
Topic(s): File required:dhtmlxtree.js
registerXMLEntity(...)
[Professional]
register XML entity for replacement while initialization (default are: ampersand, lessthen and greaterthen symbols)
Topic(s): File required:dhtmlxtree_xw.js
restoreSelectedItem(...)
[Professional]
restore selected item from cookie
Topic(s): File required:dhtmlxtree_xw.js
saveOpenStates(...)
[Professional]
save open nodes to cookie
Topic(s): File required:dhtmlxtree_xw.js
saveSelectedItem(...)
[Professional]
save selected item to cookie
Topic(s): File required:dhtmlxtree_xw.js
saveState(...)
[Professional]
save tree to cookie
Topic(s): File required:dhtmlxtree_xw.js
selectItem(itemId,mode,preserve) select node ( and optionaly fire onselect event)
Topic(s): File required:dhtmlxtree.js
itemId - node id
mode - If true, script function for selected node will be called.
preserve - preserve earlier selected nodes
serializeTree(...)
[Professional]
get xml representation (as string) of tree
Topic(s): File required:dhtmlxtree_xw.js
serializeTreeToJSON() return tree as json string
Topic(s): File required:dhtmlxtree_json.js
setCheck(itemId,state) set state of node's checkbox
Topic(s): File required:dhtmlxtree.js
itemId - target node id
state - checkbox state (0/1/"unsure")
setChildCalcHTML(...)
[Professional]
set children calculation prefix and postfix
Topic(s): File required:dhtmlxtree.js
setChildCalcMode(...)
[Professional]
set children calculation mode
Topic(s): File required:dhtmlxtree.js
setCustomSortFunction(...)
[Professional]
set custom sort functions, which has two parametrs - id_of_item1,id_of_item2
Topic(s): File required:dhtmlxtree_sb.js
setDataMode(mode) set default data transfer mode
Topic(s): File required:dhtmlxtree.js
mode - data mode (json,xml,csv)
setDragBehavior(...)
[Professional]
set Drag-And-Drop behavior (child - drop as chils, sibling - drop as sibling, complex - complex drop behaviour )
Topic(s): File required:dhtmlxtree.js
setEditStartAction(click_IE, dblclick) define which events must start editing
Topic(s): File required:dhtmlxtree_ed.js
click_IE - click on already selected item - true/false [true by default]
dblclick - on double click
setEscapingMode(mode) set escaping mode (used for escaping ID in requests)
Topic(s): File required:dhtmlxtree.js
mode - escaping mode ("utf8" for UTF escaping)
setIconSize(...)
[Professional]
set size of icons
Topic(s): File required:dhtmlxtree.js
setImageArrays(arrayName,image1,image2,image3,image4,image5) set images used for parent-child threads drawing (lines, plus, minus)
Topic(s): File required:dhtmlxtree.js
arrayName - name of array: plus, minus
image1 - line crossed image
image2 - image with top line
image3 - image with bottom line
image4 - image without line
image5 - single root image
setImagePath( newPath ) set path to images directory
Topic(s): File required:dhtmlxtree.js
newPath - path to images directory (related to the page with tree or absolute http url)
setItemCloseable(itemId,flag) prevent node from closing
Topic(s): File required:dhtmlxtree.js
itemId - id of node
flag - if 0 - node can't be closed, else node can be closed
setItemColor(itemId,defaultColor,selectedColor) set node text color
Topic(s): File required:dhtmlxtree.js
itemId - id of node
defaultColor - node color
selectedColor - selected node color
setItemContextMenu(...)
[Professional]
set context menu to individual nodes
Topic(s): File required:dhtmlxtree.js
setItemImage(itemId,image1,image2) set item icons (mostly usefull for childless nodes)
Topic(s): File required:dhtmlxtree.js
itemId - id of node
image1 - node without children icon or closed node icon (if image2 specified)
image2 - open node icon (optional)
setItemImage2(itemId, image1,image2,image3) set item images
Topic(s): File required:dhtmlxtree.js
itemId - id of node
image1 - node without children icon
image2 - closed node icon
image3 - open node icon
setItemStyle(itemId,style_string) set individual item style
Topic(s): File required:dhtmlxtree.js
itemId - node id
style_string - valid CSS string
setItemText(itemId,newLabel,newTooltip) set new node text (HTML allowed)
Topic(s): File required:dhtmlxtree.js
itemId - id of node
newLabel - node text
newTooltip - (optional)tooltip for the node
setItemTopOffset(...)
[Professional]
set top offset for item
Topic(s): File required:dhtmlxtree.js
setListDelimeter(...)
[Professional]
set list separator ("," by default)
Topic(s): File required:dhtmlxtree.js
setLockedIcons(...)
[Professional]
set icon for locked items
Topic(s): File required:dhtmlxtree_li.js
setOnDblClickHandler(func)
[Depricated]
set function called when tree node double clicked
Depricated! - use grid.attachEvent("onDblClick",func); instead
Topic(s): Handlers;
File required:dhtmlxtree.js
func - event handling function
setSerializationLevel(...)
[Professional]
configure XML serialization
Topic(s): File required:dhtmlxtree_xw.js
setStdImages(image1,image2,image3) set default images for nodes (must be called before XML loading)
Topic(s): File required:dhtmlxtree.js
a0 - image for node without children;
a1 - image for closed node;
a2 - image for opened node
setSubChecked(itemId,state) change state of node's checkbox and all children checkboxes
Topic(s): File required:dhtmlxtree.js
itemId - target node id
state - checkbox state
setUserData(itemId,name,value) set user data for target node
Topic(s): File required:dhtmlxtree.js
itemId - target node id
name - key for user data
value - user data value
setXMLAutoLoading(filePath) enables dynamic loading from XML
Topic(s): File required:dhtmlxtree.js
filePath - name of script returning XML; in case of virtual loading - user defined function
setXMLAutoLoadingBehaviour(...)
[Professional]
define which script be called on dynamic loading
Topic(s): File required:dhtmlxtree.js
showItemCheckbox(...)
[Professional]
show/hide checkbox for tree item (works only for individual items, not for entire tree )
Topic(s): File required:dhtmlxtree.js
showItemSign(...)
[Professional]
show/hide (+/-) icon (works only for individual items, not for entire tree )
Topic(s): File required:dhtmlxtree.js
smartRefreshBranch(...)
[Professional]
refresh specified tree branch (get XML from server, add new nodes, remove not used nodes)
Topic(s): File required:dhtmlxtree.js
smartRefreshItem(...)
[Professional]
refresh specified tree item (get XML from server, add new nodes, remove not used nodes)
Topic(s): File required:dhtmlxtree.js
sortTree(...)
[Professional]
reorder items in tree according to their text
Topic(s): File required:dhtmlxtree_sb.js
stopEdit() switch currently edited item back to normal view