Skip to main content

getSelectedCell()

Description

Returns the id(s) of selected cell(s)

Usage

getSelectedCell(): string;

Returns

The method returns an id(s) or a range of selected cell(s)

Example

const spreadsheet = new dhx.Spreadsheet("spreadsheet", {
// config parameters
});
spreadsheet.selection.setSelectedCell("B7,B3,D4,D6,E4:E8");
// gets the selected cells
const selected = spreadsheet.selection.getSelectedCell(); // -> "B7,B3,D4,D6,E4:E8"

Related articles: Work with Spreadsheet