954,116 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

ComboBox Events

What event can I use that will:

Retain value when leaving field: Lostfocus, leave, enter, etc, Value works with
the exception of Tab, also fires with every keystroke, lostfocus & leave will
not work with all ways of leaving field.

Help

gcc777
Newbie Poster
3 posts since Mar 2005
Reputation Points: 10
Solved Threads: 0
 

I think you need to explain the problem in more detail; I don't understand the question.

MrConfused
Light Poster
32 posts since Mar 2005
Reputation Points: 10
Solved Threads: 0
 

Yeah, If you could help me with a clearer picture... or even zip and attach the project so we can see what you are doing, that would be outstanding!

Comatose
Taboo Programmer
Team Colleague
2,910 posts since Dec 2004
Reputation Points: 361
Solved Threads: 215
 

Control is an Infragistics combobox with grid.
I'm using VB.net

Objective: Run sub after leaving combobox.

Problem: Lostfocus & Enter - does not hold combobox value when leaving field
Leave - Works if value is in grid, otherwise no
ValueChanged - works the best, but fires every time, Tab key will pull
first row when value in combo is not contained in
grid, Enter key will work

gcc777
Newbie Poster
3 posts since Mar 2005
Reputation Points: 10
Solved Threads: 0
 

Ok, I'm Moving this thread to VB.Net

Comatose
Taboo Programmer
Team Colleague
2,910 posts since Dec 2004
Reputation Points: 361
Solved Threads: 215
 

You can set up one sub and then set it to handle all of the events such as on lostfocus on mouseleave, etc. Then you could assign the row value to a variable possibly...

Chester

cpopham
Junior Poster in Training
65 posts since Mar 2005
Reputation Points: 10
Solved Threads: 0
 

What event can I use that will:

Retain value when leaving field: Lostfocus, leave, enter, etc, Value works with the exception of Tab, also fires with every keystroke, lostfocus & leave will not work with all ways of leaving field.

Help


Wait on are you using radio buttons and check boxes? If you are it should be rad or chk in a combo box.

goaldrush
Newbie Poster
15 posts since Apr 2005
Reputation Points: 11
Solved Threads: 0
 
Objective: Run sub after leaving combobox. Problem: Lostfocus & Enter - does not hold combobox value when leaving field Leave - Works if value is in grid, otherwise no ValueChanged - works the best, but fires every time, Tab key will pull first row when value in combo is not contained in grid, Enter key will work

Ok so let me see if I get this? You have a combobox with data values in it, and when the user selects a value you want it retained, but it is not being retained?

From what you have stated, the value grabbed when the "tab" key is pressed is the first row? If that because the user has not selected the value in the combobox, and it is left blank? Cause if the user just enters the combobox and does not select a value, and tabs out of the combobox, this could be true that first row "by default" is grabbed, as it depends on how you setup your code/data binding.

But what you have stated isnt very clear. If we could see some of the code around this combobox setup it would certainly helps us find a solution to you.

And goaldrush:

What do you mean rad or chk in combobox? Is there something that you are aware of that we are not?

As well how does Radio buttons or check boxes change the original question consideration here.

Wait on are you using radio buttons and check boxes? If you are it should be rad or chk in a combo box.
Paladine
Master Poster
Team Colleague
824 posts since Feb 2003
Reputation Points: 211
Solved Threads: 27
 

What event can I use that will:

Retain value when leaving field: Lostfocus, leave, enter, etc, Value works with the exception of Tab, also fires with every keystroke, lostfocus & leave will not work with all ways of leaving field.

Help


how to write code for combobox

gaurav1004
Newbie Poster
2 posts since May 2007
Reputation Points: 10
Solved Threads: 0
 

how to write code in combobox

gaurav1004
Newbie Poster
2 posts since May 2007
Reputation Points: 10
Solved Threads: 0
 

>how to write the code in combobox
:D

well you have to go to the code editor's window and type combobox. (and you will see a lot of intellisense or memberlist listing out. Use it and see). This mite be the answer for your question.

arjunsasidharan
Practically a Posting Shark
826 posts since Aug 2006
Reputation Points: 347
Solved Threads: 13
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You