I am registering my own command for the editor to handle copy. It works but users have reported intermittent issues which I've finally tracked down but have not been able to figure out a workaround.
editor.KeyBindings.RegisterCommand(Me.CopyCommand, Key.C, modifierKeys:=ModifierKeys.Control)
The issue is that this only works if the user clicks within the cells of the spreadsheet. If they have clicked on the row or column headers to select cells, or the "select all" in the corner without first clicking within the cells, the command is never called. Once they have clicked in the cells it works to click on the headers, but if they click on a control entirely outside of the spreadsheet, then the problem repeats.
I've tried all kinds of workarounds, including key bindings and event handlers for all the key and previewkey events on the editor, the spreadsheet, and even the header controls. None of them are ever called. Something is eating the events.
Edit: I should add I removed all other key bindings and also tried different key combinations and it still doesn't work.
Hi Steve,
I have tested this and it works on my side with the latest version of the suite. I would recommend posting a new ticket for this where you can attach your project. This will allow us to properly investigate the issue.
In addition, please make sure that the command is registered in the ActiveSheetEditorChanged event handler. This will ensure that the command is not lost when changing the editor.
I hope this helps. Should you have any other questions do not hesitate to ask.I work with Steve and he asked me to work on this. I made a small sample project that displays this issue. I didn't have to make a customized copy command to reproduce it.
Run the project. Don't click in any cells in the spreadsheet. Click on the rectangle in the upper left corner between the row and column headers to Select All. Press Ctrl+C. Try pasting into Excel, and you can see nothing was copied. If you then click in a cell in the spreadsheet and then click on the Select All rectangle again and Ctrl+C, you can see that it then copies it.
Hi Jennifer,
I have checked the project but I do not see the implementation for the custom command. The project is empty besides setting the value of a single cell. Is this the correct scenario that should be tested.
I am looking forward to your reply.
Hi Jennifer,
Ok, I understand, I was able to reproduce this. I have logged this issue on our portal. You can track its progress, subscribe to status changes, and add your comment to it here: Spreadsheet: One is unable to paste in Excel when selecting all and copying with the top left button. I have updated your Telerik points for this report.
I am afraid I cannot suggest a workaround for this.
I want to apologize for the inconvenience this is causing you.