RadSpreadsheet Keybinding issues

0 Answers 91 Views
Spreadsheet
Steve
Top achievements
Rank 1
Steve asked on 09 Feb 2024, 01:32 PM | edited on 09 Feb 2024, 01:36 PM

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.

Dimitar
Telerik team
commented on 12 Feb 2024, 12:31 PM

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.
Jennifer
Top achievements
Rank 1
Iron
commented on 20 Jun 2024, 07:53 PM

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.

Dimitar
Telerik team
commented on 21 Jun 2024, 08:45 AM

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.

Jennifer
Top achievements
Rank 1
Iron
commented on 21 Jun 2024, 10:01 AM

Yes, like I said in the previous comment, I was able to reproduce the issue without making a customized command.  So it seems that the issue is in the RadSpreadsheet itself and not in how it hooks up to the custom command.
Dimitar
Telerik team
commented on 25 Jun 2024, 06:02 AM

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.

No answers yet. Maybe you can help?

Tags
Spreadsheet
Asked by
Steve
Top achievements
Rank 1
Share this question
or