Our blazing fast Grid component built with pure JavaScript


Post by prashantgoel »

How can I enable copying a cell value to the clipboard? Our users have a need to be able to copy cell values to the clipboard (for example an email address) and paste in a different window like Outlook.

We don't want the cells to be editable. I tried the following config, but no luck:

grid = new Grid({
    flex: 1,
    selectionMode: { cell: true },
    features: {
        rowCopyPaste: false,
        cellCopyPaste: true,
        cellEdit: false,

Post by tasnim »

Hi,

Thanks for reaching out!

To achieve this, you'd need to set https://bryntum.com/products/grid/docs/api/Grid/feature/CellCopyPaste#config-useNativeClipboard to true

Example

    selectionMode : {
        cell : true
    },

features : {
    group : false,
    rowCopyPaste : false,
    cellCopyPaste : {
        useNativeClipboard : true
    }
},

Notepad_kF6hOWUPKu.gif
Notepad_kF6hOWUPKu.gif (468.19 KiB) Viewed 76 times

All the best,
Tasnim


Post Reply