Ability to select partial text and editing on a single click

Posted by: syadagiri on 28 May 2019, 2:21 pm EST

    • Post Options:
    • Link

    Posted 28 May 2019, 2:21 pm EST

    Hello,

    I’d like to have some insights on an issue we are facing while selecting partial cell content.

    Firstly, herehttps://jsfiddle.net/Wijmo5/bmy924f7/ is the fiddle I’ve used as a reference to achieve partial cell selection.

    However we have a use case which requires the flex grid to be editable on a single click and also be able to copy like below stackblitz. Could you please let us know how we can achieve both using the below stackblitz.

    https://stackblitz.com/edit/angular-3a3qy4

    Thank you

  • Posted 29 May 2019, 7:19 am EST

    https://www.grapecity.com/forums/wijmo/ability-to-select-partial-

    Hello,

    You can achieve this behavior by handling mouseup, mousedown and click event of flexgrid. Please refer to the sample below:

    https://stackblitz.com/edit/angular-u2jvv9

  • Posted 29 May 2019, 9:34 am EST

    Thanks Abhishek. However if you can observe I’m unable to copy text post edit.

    Steps to reproduce:

    • " Select multiple cells by dragging the cursor."

    • “Copy the content using Ctrl + C and paste using Ctrl + V. Works as expected.”

    • “Edit the cell content”

    • “Post editing, try selecting multiple cells by dragging the cursor and copy (Ctrl + C) and paste (Ctrl + V), does not copy multiple cells”

    • “However if you right mouse click and Copy / Paste, it does work as expected.”

    Any insights on the issue would be appreciated.

  • Posted 30 May 2019, 7:44 am EST

    Hi,

    The reason behind this behavior was that when we edited a cell and then clicked outside that cell, the selection changes to this new cell. And then we copy the selected text but the copying event is handled by the grid instead of the browser. That is why only one value was being copied.

    To solve this, we just need to set the autoClipboard property of flexgrid to false. Please refer to the sample below:

    https://stackblitz.com/edit/angular-y4wpaf

    ~sharad

  • Posted 30 May 2019, 1:46 pm EST

    Thank you for the quick response. Much helpful.

Need extra support?

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

Learn More

Forum Channels