Navigation in RadSpreadsheet

4 posts, 1 answers
  1. Joy
    Joy avatar
    5 posts
    Member since:
    May 2014

    Posted 14 May 2014 Link to this post


    I have a requirement where user should be able to traverse through the spreadsheet columns vertically using only Tab or Enter Key.
    For ex: If I have entered some value in column1, cell 1, when I press Tab, focus should move on to the next cell in the same column1. and I should be able to keep doing this for, suppose, next 1000 rows.  Then I would like to start on column2, cell1, and do the same traversal using Tab key or Enter key and so on.
    So my question is how do I capture the tab key press event or enter key press event and move the focus on to the next cell below the current cell ( not the cell on the right side)  for data entry ?

    I would really appreciate the quick response.
    Thank you.

  2. Answer
    Nikolay Demirev
    Nikolay Demirev avatar
    108 posts

    Posted 15 May 2014 Link to this post

    Hello Jyotsna,

    The RadSpreadsheet provides a simple way to bind a key to a command. The following example shows how using the Enter key to set the cell style to "Bad".

    this.radSpreadsheet.ActiveSheetEditorChanged += this.RadSpreadsheet_ActiveSheetEditorChanged;
    private void RadSpreadsheet_ActiveSheetEditorChanged(object sender, EventArgs e)
        RadWorksheetEditor worksheetEditor = this.radSpreadsheet.ActiveWorksheetEditor;
        if (this.radSpreadsheet.ActiveWorksheetEditor != null)
            worksheetEditor.KeyBindings.RegisterCommand(worksheetEditor.Commands.SetStyleCommand, Key.Enter, ModifierKeys.None, "Bad");

    Please bear in mind that if there is already key binding assigned to that key it will be replaced with the new one.

    I hope this helps. Feel free to write back if you have any further questions.

    Nikolay Demirev
    Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
  3. Joy
    Joy avatar
    5 posts
    Member since:
    May 2014

    Posted 15 May 2014 in reply to Nikolay Demirev Link to this post

    Thanks very much Nikolay for the quick reply. It really helped me moving into the right direction to solve the problem.
  4. Dragos
    Dragos avatar
    1 posts
    Member since:
    Aug 2013

    Posted 9 hours ago Link to this post

    Hello, regarding this issue, the provided solution works only if you are not in edit mode. After you edit a cell and hit Enter, the command is no longer fired. Is there a workaround for this case ?
Back to Top