The TreeList provides low-level hooks for implementing custom selection logic.
You can control the selection state by specifying the
isSelected function. The function is executed for each row or cell in the TreeList and determines whether the item will be selected.
kendoTreeListSelectabledirective applies its default
isSelectedcallback to determine which rows or cells will be selected. To override the default behavior, do not apply the directive when using a custom
isSelectedcallback. To refresh the selected state and force re-evaluation of the
isSelectedcallback, invoke the TreeList updateView method.
The following example demonstrates row selection with
To target specific cells, both
columnIndex can be used to determine which cells will be selected.
The following example demonstrates cell selection with
You can effectively persist the selected state of rows in the TreeList by employing the
isSelected callback and handling the
The following example demonstrates how to utilize these features to maintain the selected state as a field.