Skip to main content

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:

NameDescription
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:

NameDescription
afterSelectfires after selecting an item
afterUnSelectfires after unselecting an item
beforeSelectfires on selecting an item, but before the item is really selected
beforeUnSelectfires 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: