startEdit()
Description
Starts editing in the selected cell
info
If the id of a cell isn't passed, editing starts in the currently selected cell.
Usage
startEdit(cell?: string, initialValue?: string): void;
Parameters
cell- (optional) the id of a cellinitialValue- (optional) the cell value
Example
const spreadsheet = new dhx.Spreadsheet("spreadsheet_container", {});
spreadsheet.parse(data);
// starts editing the currently selected cell
spreadsheet.startEdit();
Details
Typing in the active cell starts editing through this method. Text composed with an input method editor (IME) is passed as initialValue when the composition ends. So the beforeEditStart and afterEditStart events receive the typed or the composed text, and beforeEditStart can cancel the edit.
Change log: Starting the edit with the text composed with an IME was added in v6.0.4
Related article: Work with Spreadsheet