Skip to main content

beforeEditEnd

Description

Fires before editing of a cell is finished

Usage

beforeEditEnd: (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 finish editing a cell, false to prevent closing of an editor

Example

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

// subscribe on the "beforeEditEnd" event
spreadsheet.events.on("beforeEditEnd", function(cell, value){
console.log("Editing has started");
console.log(cell, value);
return true;
});

Related articles: Event handling