Web Components Working with Clipboard

    This topic explains how to perform clipboard operations on the Ignite UI for Web Components spreadsheet component.

    Web Components Working with Clipboard Example

    EXAMPLE
    DATA
    TS
    HTML
    CSS

    Like this sample? Get access to our complete Ignite UI for Web Components toolkit and start building your own apps in minutes. Download it for free.

    Dependencies

    Before making use of the clipboard you will want to import the SpreadsheetAction enumeration:

    import { IgcSpreadsheetComponent } from 'igniteui-webcomponents-spreadsheet';
    import { SpreadsheetAction } from 'igniteui-webcomponents-spreadsheet';
    ts
    Ignite UI for Web Components | CTA Banner

    Usage

    The following code snippet shows how you can execute commands related to the clipboard in the Web Components IgcSpreadsheetComponent control:

    public cut(): void {
        this.spreadsheet.executeAction(SpreadsheetAction.Cut);
    }
    
    public copy(): void {
        this.spreadsheet.executeAction(SpreadsheetAction.Copy);
    }
    
    public paste(): void {
        this.spreadsheet.executeAction(SpreadsheetAction.Paste);
    }
    ts

    API References