Skip to main content
16-Pearl
April 25, 2023
Question

copy functionality in selecting the data in tree grid.

  • April 25, 2023
  • 1 reply
  • 1122 views

how to implement copy functionality in selecting the data in tree grid 

 

1 reply

16-Pearl
April 25, 2023

You mean a copy to clipboard functionality? If so there, is no such functionality yet: https://community.ptc.com/t5/ThingWorx-Ideas/New-widget-to-be-able-to-copy-data-to-the-clipboard/idi-p/616955

16-Pearl
April 25, 2023

Okay Thanks

16-Pearl
April 26, 2023

As I was interested I did adapt an existing widget-extension we have with CopyToClipboard. It just uses 'navigator.clipboard.writeText(copyText.value);' like described in https://www.w3schools.com/howto/howto_js_copy_clipboard.asp

 

nmutter_1-1682544693178.png

It is not "offical" yet, still in my fork. But if you want to give it a try: https://github.com/Death111/CopyToClipboardWidgetTWX  in Actions tab you can select the latest pipeline (current) run to download the extension (need to be logged in in github).

It did work fine in my test instance and Chrome. What I've read about the navigator.clipboad function is that it only works on https sites or localhost