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
JMO9966Asked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
AUmidhConnect With a Mentor Commented:
@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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.