Redirect the shortcut „Ctrl+S“

2 posts, 0 answers
  1. Ates
    Ates avatar
    15 posts
    Member since:
    Nov 2010

    Posted 30 Oct 2015 Link to this post

    Hello every body,

    I am currently trying to custumize the RadSpreadsheet. My purpose is to redirect the shortcut  „Ctrl+S“  to my own custum command.
    I tried this

    <telerik:RadSpreadsheet x:Name="radSpreadsheet" >
                    <KeyBinding Gesture="Ctrl+S" Command="{Binding myCommand}"/>

    But I am still getting the default command. Is there any way to achieve what I want?
    Just to make it clear. I did the same thing with RadRichTextBox

    <telerik:RadRichTextBox x:Name="radRichTextBox" >
                            <KeyBinding Gesture="Ctrl+S" Command="{Binding SaveFileCommand}" />
    </telerik:RadRichTextBox x:Name="radRichTextBox" >

    it works well.

    Please help.

    Best regards
  2. Anna
    Anna avatar
    99 posts

    Posted 03 Nov 2015 Link to this post


    For the RadSpreadsheet control, the key bindings are kept in the InputBindings collection of the RadWorksheetEditor, instead of that of RadSpreadsheet. The following line should do the trick:

    this.radSpreadsheet.ActiveWorksheetEditor.KeyBindings.RegisterCommand(myCommand, Key.S, ModifierKeys.Control);

    Let me know if you need anything further regarding this or any other matter.

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. DevCraft banner
Back to Top