ClipboardCopyEvent

Defines event arguments for clipboard copy operations in the Grid component. Provides information about the data being copied, including selected cells or rows, and allows customization or cancellation of the copy operation. Contains contextual information about which rows and columns were copied, along with the formatted clipboard text being written.

Props

The following table outlines the props for the ClipboardCopyEvent:

NameTypeDefaultDescription
cancel
boolean
false

Cancel the copy operation. Setting this to true prevents the data from being written to clipboard.

clipboardText
string
''

Contains the formatted tab-separated or newline-separated text content being copied to clipboard. For rectangular selections, uses tab-separated columns within each row. For scattered selections, uses newline-separated values.

copyWithHeaders
boolean
false

Specifies whether column headers are included in the copied content.

selectedCells
[ ]

List of selected cells being copied. Applicable only when selectionType is Cell. Contains row and column information for each selected cell.

selectedRowIndexes
number[]
[ ]

List of selected row indexes being copied. Applicable only when selectionType is Row. Contains zero-based row indexes in ascending order.