Skip to main content

beforeEditStart

Description

Fires before editing of a cell has started

Usage

beforeEditStart: (cell: string, value: string) => void | boolean;

Parameters

The callback of the event takes the following parameters:

  • cell - (required) the id of a cell
  • value - (required) the value of a cell

Returns

Return true to edit a cell, false to prevent editing

Example

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

// subscribe on the "beforeEditStart" event
spreadsheet.events.on("beforeEditStart", function(cell, value){
console.log("Editing is about to start");
console.log(cell, value);
return true;
});

Related articles: Event handling