FlexGrid selectable col headers for copy+paste

Posted by: robert.douglas on 6 July 2018, 4:58 am EST

  • Posted 6 July 2018, 4:58 am EST

    Is there a way to allow the users to select column headers as part of a cell range for copy+paste? Currently using a grid with CellRange selection mode but it will not allow selection of the column headers. It seems that the examples also share this behavior. Curious if I’m missing some configuration option that will allow it.

  • Posted 8 July 2018, 9:09 pm EST

    Hi,

    To achieve the required functionality you can handle grid’s copying event and modify the clipboard’s content to add handers data.

    Please refer to the following sample which demonstrates the same:-

    https://stackblitz.com/edit/js-qbwn78?file=index.js

    ~Manish

  • Posted 11 July 2018, 8:53 am EST

    That would work if we want to include the header text in every copy and paste. I would like to copy the headers only if the user has selected them for copy and paste. Is this not possible?

  • Posted 11 July 2018, 10:38 pm EST

    Hi,

    In such a case you may add a checkbox in the topleft cell which would indicate whether to include headers or not.

    You may also set grid’s showSelectedHeaders property to ‘Column’ to tell grid to show selected headers.

    Please refer to the following updated sample:-https://stackblitz.com/edit/js-esgnbh?file=index.html

    ~Manish

Need extra support?

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

Learn More

Forum Channels