I am working with the spreadsheet. When I copy a cell or group of cells, the Paste function becomes enabled in the ribbon and the context menu. I move to the cell I wish the paste to start in and click on paste (ribbon or context menu) and the data is copied as you would expect. I notice that the cell(s) I copied from have a broken border similar to selected cell(s) in Excel. I hit escape and it clears the broken border so you would assume that the clipboard has been cleared. But no, Paste is still enabled and if I use the paste feature again, it continues to paste the data from the previously selected cells. Since the escape key only clears the broken border, how do I clear the previous selection (clipboard) and disable the Paste feature after I have finished my copy and paste?
To see this in action go right to the example on this web site:
SISilambarasan I Syncfusion Team October 26, 2016 12:31 PM UTC
Thank you for using Syncfusion products.
We have checked the reported query and we would like to let you know that as per the web platform behaviour, we can’t able to access the clipboard from client-side to clear its content which is existing feature in Online MS Excel too.
When you copy a cell or range of cells in Spreadsheet, we have copied the cells data to the clipboard and updating some internal properties for perform the paste action.Once press the escape key after you pasted, we have clear the maintained internal properties alone.However, the content in the clipboard will not be cleared.
UNUnknown Syncfusion Team October 26, 2016 01:33 PM UTC
Thanks for your quick response.
I tried it using Excel On-Line and it does clear the selected value.
Open a spreadsheet using Excel On-Line.
Pick any cell and enter a value.
Copy that cell and the broken border appears.
Paste that value in another cell.
Click on Escape and the broken border disappears.
Go to another cell and click on Paste and nothing is pasted into that cell.
This is what I am looking for. On ejSpreadsheet, you can continue to paste the last selected value(s) even after it appears you have cleared the broken border by clicking escape.
Assuming what I want cannot be done at this time, is there a way to disable the Paste links through CSS or JS and still maintain it's ability to be enabled if I decide to copy other cells? I can capture the "paste" event so I know when it ends and would like to be able to disable Paste at that point.
SISilambarasan I Syncfusion Team October 27, 2016 11:38 AM UTC
Thanks for your update.
Query #1 “I tried it using Excel On-Line and it does clear the selected value.”
We have checked the reported query and we can able to reproduce it in our end as per the following steps.
1. In ejSpreadsheet, select any cell and click “Copy” option in (Ribbon or Context menu) by using mouseclick and not using keyboard interaction (i.e. Ctrl + C).
2. After pressing Escape key, the previous copied data get pasted by clicking “Paste” option in (Ribbon or Context menu) by using mouseclick. But in online MS Excel, you could get an alert dialog when clicking paste button as like follows,
Could you please confirm whether the above replication procedures are same as that you are facing in your end, so that it will be helpful for us to resolve your issue and proceed this further?
Query #2 “Is there a way to disable the Paste links through CSS or JS and still maintain it's ability to be enabled if I decide to copy other cells? I can capture the "paste" event so I know when it ends and would like to be able to disable Paste at that point.”
Your requirement for disable the Paste option in Ribbon can be achieved by using “XLRibbon.disableRibbonItems()” client-side method.Please refer the following code example.