Keyboard support Left/Right disable

3 posts, 0 answers
  1. YLS
    YLS avatar
    7 posts
    Member since:
    Jun 2012

    Posted 25 Feb 2013 Link to this post


    In the documentation, it says:
    • Up\Down - the Up and Down Arrow keys have two functions depending on the state of the dropdown:
      • When the dropdown of the RadComboBox is opened, then pressing Up\Down Arrows will change the highlighted item in the list.
      • When the dropdown of the RadComboBox is closed, then pressing Up\Down Arrows will change the SelectedItem.
    • Left\Right - the Left and RightArrow keys have the same functions as the Up and Down. However, they will affect the selected\highlighted item only when the RadComboBox is not editable (the IsEditable property is set to False).
     My  IsEditable is set to False. However this will enable Left\Right key to cycle through the items instead of going to the next cell (I put this ComboBox in a DataGrid).
    Is there any way that I can disable the Left\Right key function in a ComboBox so it only goes to cell on its left or right side?  There is an alternate way to do so: IsEditable = False, IsReadOnly = True; but I don't really feel good about this. Any suggestions? Thanks, Yala
  2. Konstantina
    Konstantina avatar
    2332 posts

    Posted 28 Feb 2013 Link to this post

    Hi Yala,

    Since the ComboBox handles the KeyDown event, I could suggest you to inherit from the RadComboBox and override the HandleKeyDown. In that way you could remove the functionality of the Left and Right arrow key changing the selected item.

    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  3. DevCraft R3 2016 release webinar banner
  4. YLS
    YLS avatar
    7 posts
    Member since:
    Jun 2012

    Posted 28 Feb 2013 Link to this post

    Hi Konstantina,

    Thank you for your reply, it works well.

    I also found this that helps:

Back to Top