Use Enter instead of Tab to navigate

2 posts, 0 answers
  1. Leonardo
    Leonardo avatar
    7 posts
    Member since:
    Apr 2009

    Posted 10 Sep 2010 Link to this post

    I need to change the focus of my controls pressing Enter key, instead of Tab for all fields in my solution.
    So I made a javascript code that change the behavior of Enter to Tab.

    function document.onkeydown() {
        if (window.event.keyCode == 13) {
            window.event.keyCode = 9;
        }
    }

    It works in all controls but the RadComboBox. I think it happens because the Telerik ComboBox has a default behavior for the Enter key, which does the selection of Items.

    Is there a way to disable this default behavior or something that resolve this problem?
  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 10 Sep 2010 Link to this post

    Hello,

    I believe you can achieve this by attaching "OnClientKeyPressing" event to RadComboBox. In the event handler, access the next control and set the focus to that control.

    More information about  "OnClientKeyPressing" event will be available here:
    OnClientKeyPressing

    -Shinu
Back to Top