Selection in TypeScript Treegrid control
Selection provides an option to highlight a row or a cell. It can be done through simple mouse down or arrow keys. To disable selection in TreeGrid, set the allowSelection to false.
The treegrid supports two types of selection that can be set by using the selectionSettings.type. They are:
-
Single: TheSinglevalue is set by default, and it only allows selection of a single row or a cell. -
Multiple: Allows you to select multiple rows or cells.
To perform the multi-selection, press and hold CTRL key and click the desired rows or cells. To select range of rows or cells, press and hold the SHIFT key and click the rows or cells.
Selection mode
TreeGrid supports three types of selection mode which can be set by using
selectionSettings.mode. They are:
-
Row- Therowvalue is set by default. Allows you to select rows only. -
Cell- Allows you to select cells only. -
Both- Allows you to select rows and cells at the same time.
Touch interaction
When you tap a treegrid row on touchscreen device, the tapped row is selected.
It also shows a popup
for multi-row selection.
To select multiple rows or cells, tap the popup
and then tap the desired rows or cells.
Multi-selection requires the selection
typeto bemultiple.
The following screenshot represents a treegrid touch selection in the device.

You can refer to our
JavaScript Tree Gridfeature tour page for its groundbreaking feature representations. You can also explore our JavaScript Tree Grid exampleJavaScript Tree Grid exampleto knows how to present and manipulate data.