This is a migrated thread and some comments may be shown as answers.

Use Enter instead of Tab to navigate

1 Answer 31 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Leonardo
Top achievements
Rank 1
Leonardo asked on 10 Sep 2010, 01:08 PM
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?

1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 1
answered on 10 Sep 2010, 01:16 PM
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
Tags
ComboBox
Asked by
Leonardo
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 1
Share this question
or