Css and edit not working after paste multiple cell in a column

Posted by: viethdhe130200 on 27 March 2022, 7:52 pm EST

    • Post Options:
    • Link

    Posted 27 March 2022, 7:52 pm EST - Updated 3 October 2022, 3:01 am EST

    My table flexgrid was custom something ( set edit and set the background color, … ). I have a problem with copy/paste events:

    +, If I copy multiple cells (correspond to the picture: “paste row.png”) in a row in excel and paste to flexgrid, it will be ok.

    +, But, if I copy multiple cells (correspond to the picture: “paste column.png”) in a column in excel and paste to flexgrid, it won’t be ok ( the CSS that I originally customized will be lost and the cells I set up to be edited can’t be edited, all of them will be the only view)

    ===> I have a problem when pasting with multiple cells in a column ( 2nd case above). So, hope you can help me to cover 2nd case above. Thank you very much <3.

  • Posted 27 March 2022, 7:55 pm EST - Updated 3 October 2022, 3:01 am EST

    +, paste row.png:

    +, paste column.png:

  • Posted 28 March 2022, 10:07 pm EST

    Hi,

    Can you please share a small sample that replicates the behavior of the customized flexgrid so that we can investigate the issue further?

    Regards,

    Ashwin

  • Posted 30 March 2022, 12:54 pm EST

    It’s an example of wijmo: https://www.grapecity.com/wijmo/demos/Grid/TreeGrid/EditableTreeGrid/react

    +, If I copy multiple cells (correspond to the picture: “paste row.png”) in a row in excel and paste to flexgrid, it will be ok.

    +, But, if I copy multiple cells (correspond to the picture: “paste column.png”) in a column in excel and paste to flexgrid, it won’t be ok ( all of them will be the only view, can’t edit )

  • Posted 30 March 2022, 5:28 pm EST

    Hi,

    This issue occurs because when pasting multiple rows, each of the row being pasted is recreated therefore leaving their isReadOnly property to the default value, which is true.

    So, to resolve this, handle the pasted event:

    this.workerGrid.pasted.addHandler((s) => {
                s.rows.forEach((row) => {
                    row.isReadOnly = false;
                });
            });
    

    Hope this helps.

    Sample for reference: https://jscodemine.grapecity.com/sample/N5liwrm1-EaUBG5cd6JVtg/

    ~regards

  • Posted 7 April 2022, 1:56 pm EST

    Sorry ashwin.saxena for my late reply. Thank you so much for your reply

    Yesterday I tried it, in my table, there will be a blinking column (that column I also customize some things), something like when f5 the window screen when I copy/paste like that

    Is there any way to prevent that column from blinking when I copy/paste? Thank you very much <3

  • Posted 7 April 2022, 10:49 pm EST

    Hello,

    As per our understanding, the blinking might be occurred due to the refreshing of the customized column data. After performing the pasting on the grid, the grid refreshes its content as per the latest data which in some cases for heavily customized columns might take a little delay. But if you are facing a major delay in the performance then please share a small sample to replicate the issue at our end so that we can investigate the issue further to find the root cause of the issue.

    Regards

  • Posted 13 April 2022, 2:48 am EST

    Thank you so much for your answer, sonu.pandey. You’re a great admin. Because our product is related to copyright, if possible, I will give you a specific example later. <3

Need extra support?

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

Learn More

Forum Channels