Skip to main content

getSelectedCell()

Description​

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

Usage​

getSelectedCell(): string;

Returns​

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

Example​

const spreadsheet = new dhx.Spreadsheet("spreadsheet", {
// config parameters
});
spreadsheet.parse(data);

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 article: Work with Spreadsheet