The TreeList allows the user to select single or multiple cells and rows. It provides a rich API for customizing the selection logic and persisting the selected items based on specific requirements.
Enable the selection by applying the built-in
To configure the selection, use the
selectable option. It accepts both
SelectableSettings parameters. If you use a
SelectableSettings parameter, the Kendo UI TreeList for Angular enables you to specify the following options:
mode—Sets the mode of the selection either to
"cell". The default value is
multiple—Determines if multiple selection is enabled. The default value is
drag—Configures the drag selection. The default value is
true, but it does not apply unless
multipleis set to
enabled—Determines if the selection functionality is enabled. The default value is
readonly—Determines whether the end user will be able to modify the selection. The default value is
The following articles cover a range of common selection scenarios, offering detailed guidance and insights for each:
The following example demonstrates the different selection modes and settings for the TreeList component.
When the user modifies the selection, the TreeList emits one or more
selectionChange events. Each contains the following information:
action—A verb that describes the user action:
"select"—When resetting the selection, for example, on item
"add"—When adding items to the selection, for example, on item
Ctrl + Click.
"remove"—When removing items from the selection, for example, on item
Ctrl + Click.
items—A collection of items affected by the action.
sender—A reference to the
By default, the TreeList handles clicks over non-focusable elements and performs selection. To disable the default behavior for custom or specific non-focusable elements, set the