SelectedCellRange

Description

A SelectedCellRange is an interface that defines a range of selected data cells.

Properties

Property

Type

Description

columns

ReadonlyColumnDefinition[]

The ColumnDefinition that is part of the cell selection range.

items

RawItem[]

The RawItem that is part of the cell selection range.

 

Example

In this example, the selected cell ranges are retrieved from the data grid and the content of each selected cell is logged into the console.

const selectedCellRanges = await datagrid.getSelectedCellRanges();

 
console.log("The selected dataCells are: "); selectedCellRanges.forEach(selectedCellRange => { selectedCellRange.items.forEach(item => { selectedCellRange.columns.forEach(column => { console.log(item[column.field]); }) }) });