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

getSelectedId
methodreturns the selected cells moveSelection
methodmoves selection in the specified direction select
methodselects 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
Join Our Forum
We've retired comments here. Visit our forum for faster technical support, connect with other developers, and share your feedback there.