Skip to main content

afterColumnAdd

caution

The afterColumnAdd 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 === "addColumn") {
console.log(actionName, config)
}
});

For more details about the new concept, see Spreadsheet actions.

Description

Fires after a new column is added

Usage

afterColumnAdd: (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 "afterColumnAdd" event
spreadsheet.events.on("afterColumnAdd", function(cell){
console.log("A new column is added");
console.log(cell);
});

Related articles: Event handling