Wijmo grid Clipboard Support Ctrl+X

Posted by: viju on 19 January 2022, 12:10 am EST

  • Posted 19 January 2022, 12:10 am EST

    Hi we use wijmo grid and want default clipboard support on grid, like copy paste which works, but with cut paste i.e., ctrl+X does not work.

  • Posted 19 January 2022, 10:45 pm EST

    Hello,

    We have responded on the support portal. Please refer to the link for the same: https://www.grapecity.com/my-account/my-support/case/CAS-28341-Q4F2L3

    Here is a copy of the response:

    
    You will need to handle the 'keyup' event of the FlexGrid and then cut the data from the FlexGrid:
    grid.hostElement.addEventListener('keyup', function(e) {
      if(e.ctrlKey && e.key === 'x') {
        const data = grid.getClipString();
        wijmo.Clipboard.copy(data);
        grid.setClipString('');
      }
    }, true)
    
    

    You may refer to the sample link below:

    https://stackblitz.com/edit/angular-ca2svn?file=src%2Fapp%2Fapp.component.ts

    Please note that if a column is required (number and date types column are required by default), then the data of that column will not be removed from the FlexGrid.

    Regards

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels