Skip to main content

afterCopy

pro version only

This functionality requires PRO version of the DHTMLX Grid (or DHTMLX Suite) package.

fires after successfully copying or cutting data

Usage

afterCopy: (isCut: boolean) => void;

Parameters:

The callback of the event is called with the following parameters:

  • isCut - indicates whether the operation was a cut (true) or a copy (false)

Example

const grid = new dhx.Grid("grid_container", {
columns: [
{ id: "a", header: [{ text: "A" }] },
{ id: "b", header: [{ text: "B" }] },
],
data: [
{ id: "1", a: "A1", b: "B1" },
],
clipboard: true
});

grid.clipboard.events.on("afterCopy", (isCut) => {
console.log(isCut ? "Data cut" : "Data copied");
});

Related API: beforeCopy

Related article: Work with Clipboard module

Change log:

added in v9.2