Items Selection

Tree provides an ability to select leaves and branches within it.

Single-item Selection

By default, selection is disabled in Tree. To activate it, set the select parameter to true.

Enabling selection in Tree

var tree = webix.ui({
    view: "tree",
    select: true

Related sample:  Selection

Multiple Selection

To enable multiple selection in Tree, set the select parameter to multiselect.

Enabling multi-selection in Tree

var tree = webix.ui({
    view: "tree",
    select: "multiselect"

Related sample:  Multiline Selection

Related Methods

getSelectedIdmethodreturns the selected cells
moveSelectionmethodmoves selection in the specified direction
selectmethodselects the specified item
selectAllmethodselects all items
isSelectedmethodchecks whether the specified item is selected or not
unselectmethodcancels selection of the specified item
unselectAllmethodremoves selection from all items

Related Events

onAfterSelecteventfires after a cell is selected
onBeforeSelecteventfires before a cell is selected
onSelectChangeeventfires when selection is changed in DataTable
Back to top