| sidebar_label | getFocusedCell() |
|---|---|
| title | getFocusedCell selection method |
| description | You can learn about the getFocusedCell selection method in the documentation of the DHTMLX JavaScript Spreadsheet library. Browse developer guides and API reference, try out code examples and live demos, and download a free 30-day evaluation version of DHTMLX Spreadsheet. |
@short: Returns the id of a focused cell
getFocusedCell(): string;The method returns an id of a focused cell
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