Author Topic: What difference between Paste method and CTRL+V  (Read 2084 times)

ldescamps

  • Newbie
  • *
  • Posts: 2
    • View Profile
What difference between Paste method and CTRL+V
« on: May 27, 2020, 10:33:37 pm »
Hi all,
I don't understand the difference between the Paste method and CTRL+V :
- I have 4 columns and 10 rows in Excel
- CTRL+C : Copy to Clipboard
- Back to my web page with pqGrid and only CTRL+V is working ...
I have a button on my page that triggers pqGrid("paste") method but nothing happens.
I saw that difference with the pro version is paste feature ... Is that right ?
I tried to send CTRL+V with jQuery but not working too.
How can I handle this ? Many tries without success ... I guess something is missing or ?
Thank you for your precious help
Laurent

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Re: What difference between Paste method and CTRL+V
« Reply #1 on: May 27, 2020, 11:25:04 pm »
As the documentation of paste method says: It pastes the copied cells / rows within the grid or from one grid to another.

https://paramquery.com/api#method-paste

If cells are copied from outside the grid, then only Ctl-V can be used to paste them in grid due to browser security restrictions.

Quote
I tried to send CTRL+V with jQuery but not working too.

It's not possible to do with jQuery because it's not allowed by browsers.

ldescamps

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: What difference between Paste method and CTRL+V
« Reply #2 on: May 28, 2020, 12:39:53 pm »
Hi and thank you for your reply. This is a browser security restriction ? I supposed that but not sure... now it's confirmed !  :-\
So no workaround ? only CTRL+V to paste external clipboard content to grid ...
Thank's again and have a nice day. Any way pqGrid is an amazing tool !
Regards