• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 275
  • Last Modified:

How to get ComboBox to recognize Enter key instead of Tab key

Hello,

I have the combobox working with using the Tab key after a value has been selected from the drop-down.

The Tab key forces the LostFocus event for this combobox to run.

I'm trying to get the Enter key to do the same thing but not having any luck.

Please share your thoughts.

Thanks,
JMO9966
0
JMO9966
Asked:
JMO9966
1 Solution
 
AUmidhCommented:
@JMO9966

You can do as the following

Just add keydown event of combo box
and in that write the following condition
if(e.keycode==keys.Enter)
{
// add what you want..
}
0
 
JMO9966Author Commented:
Thanks, that worked slick!

There was two equal signs on yours is all so I changed that.

If (e.keycode==keys.Enter)

End If
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now