Skip to main content

Tree API overview

Methods#

NameDescription
checkItem()checks the checkbox of a tree item and all its sub-items
collapse()collapses a tree item by id
collapseAll()collapses all expanded Tree items
destructor()releases the occupied resources
editItem()edits a Tree item
expand()expands a tree item by id
expandAll()expands all collapsed tree items
focusItem()sets focus to a specified tree item
getChecked()gets all checked tree items
getState()gets the state of a tree
paint()repaints Tree on a page
setState()sets state for a tree
toggle()opens/closes a tree item by id
uncheckItem()unchecks the checkbox of a tree item and all its sub-items
important

Events#

NameDescription
afterCheckfires after the state of an item is changed
afterCollapsefires after collapsing a tree item
afterDragfires after dragging of an item is finished
afterDropfires before the user has finished dragging an item but after the mouse button is released
afterEditEndfires after editing of a tree item is finished
afterEditStartfires after editing of a tree item has started
afterExpandfires after expanding a tree item
beforeCheckfires before the state of an item is changed
beforeCollapsefires before collapsing a tree item
beforeDragfires before dragging of an item has started
beforeDropfires before the user has finished dragging an item and released the mouse button
beforeEditEndfires before editing of a tree item is finished
beforeEditStartfires before editing of an item has started
beforeExpandfires before expanding a tree item
cancelDropfires on moving a mouse pointer out of item's borders while dragging the item
canDropfires when a dragged item is over a target item
dragInfires when an item is dragged to another potential target
dragOutfires when an item is dragged out of a potential target
dragStartfires when dragging of an item has started
focusChangefires on moving focus to a new item
itemClickfires on clicking a tree item
itemDblClickfires on double-clicking a tree item
itemRightClickfires on right-clicking a tree item
important

Properties#

NameDescription
autoloaddefines that the structure of a tree is being built while opening items
checkboxadds checkboxes to tree items
cssadds a CSS class(es) to the component
datasets a dataset for a tree
dragCopydefines that an item is copied to a target during drag-n-drop
dragModeenables drag-n-drop in Tree
dropBehaviourdefines the behaviour of a dragged item
editableenables editing of Tree items on a double-click
eventHandlersadds event handlers to the HTML elements of a custom template
iconallows adding custom icons for tree items
itemHeight sets the height of an item
keyNavigationenables key navigation in a tree
rootIdsets the id for the root element
selectionenables selection of Tree items
templatespecifies a template for Tree items