afterRowAdd
caution
The afterRowAdd event has been deprecated in v4.3. The event will continue work, but you'd better apply a new approach:
spreadsheet.events.on("afterAction", (actionName, config) => {
if (actionName === "addRow") {
console.log(actionName, config);
}
});
For more details about the new concept, see Spreadsheet actions.
Description
Fires after a new row is added
Usage
afterRowAdd: (cell: string) => void;
Parameters
The callback of the event takes the following parameters:
cell
- (required) the id of a cell
Example
const spreadsheet = new dhx.Spreadsheet("spreadsheet", {});
spreadsheet.parse(data);
// subscribe on the "afterRowAdd" event
spreadsheet.events.on("afterRowAdd", function(cell){
console.log("A new row is added");
console.log(cell);
});
Related articles: Event handling