Selection overview
The API of the Selection object allows you to manage selection in the following components: DataView, List, Tree, Grid, and Grid in the TreeGrid mode.
DataView, List, and Tree
Methods
Use the following methods of the Selection object to manage the selection of items in DataView, List, and Tree:
| Name | Description |
|---|---|
| add() | selects a specified item |
| disable() | disables selection functionality in the component |
| enable() | enables selection functionality in the component |
| getId() | returns the id of a selected item |
| getItem() | returns the object of a selected item |
| remove() | unselects a previously selected item |
Events
The Selection object fires the following events when it selects or unselects items in DataView, List, and Tree:
| Name | Description |
|---|---|
| afterSelect | fires after selecting an item |
| afterUnSelect | fires after unselecting an item |
| beforeSelect | fires on selecting an item, but before the item is really selected |
| beforeUnSelect | fires on unselecting an item, but before the item is really unselected |
Grid and Grid in the TreeGrid mode
Methods
Check the methods of the Selection object that manage the selection of cells in Grid and Grid in the TreeGrid mode:
Events
Check the events that the Selection object fires when it selects or unselects cells in Grid and Grid in the TreeGrid mode: