Skip to main content

getFocusedCell()

Description

Returns the id of a focused cell

Usage

getFocusedCell(): string;

Returns

The method returns an id of a focused cell

Example

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

// setting focus on a cell
spreadsheet.selection.setFocusedCell("D4");

// getting the focused cell
const focused = spreadsheet.selection.getFocusedCell(); // ->"D4"

Related articles: Work with Spreadsheet