Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
15
Selected Cell copy and paste
posted

Hello,

Is it possible to copy only the value inside the selected cell and not add the column header?

For example, copying the selected cell using ctrl+c and pasting it gives the result :

"Order ID 10672" instead of just "10672".

The stackblitz of this example is from the sorting section : https://stackblitz.com/angular/yjpokepvdjoe

Copying a cell on the stackblitz only returns the column name.

Thanks in advance,

John Hong

Parents
No Data
Reply
  • 20255
    Verified Answer
    Offline posted

    Hey John,

    Thank you for your question!

    Yes, you can define your own clipboardOptions configuration and set the `copyHeaders` property, to false. Have a look at our official documentation for more information. I believe you will find the demo very helpful.

    <igx-grid #grid [data]="data" primaryKey="ID" rowEditable="true" (onColumnInit)="initColumn($event)"
                        [showToolbar]="true" [clipboardOptions]="options" [autoGenerate]="true">
    ….
        public options = {
            enabled: true,
            copyHeaders: true,
            copyFormatters: true,
            separator: "\t"
        };
Children