943,514 Members | Top Members by Rank

Ad:
  • VB.NET Discussion Thread
  • Unsolved
  • Views: 23801
  • VB.NET RSS
You are currently viewing page 1 of this multi-page discussion thread
Mar 30th, 2005
0

ComboBox Events

Expand Post »
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
Reputation Points: 10
Solved Threads: 0
Newbie Poster
gcc777 is offline Offline
3 posts
since Mar 2005
Mar 30th, 2005
0

Re: ComboBox Events

I think you need to explain the problem in more detail; I don't understand the question.
Reputation Points: 10
Solved Threads: 0
Light Poster
MrConfused is offline Offline
32 posts
since Mar 2005
Mar 30th, 2005
0

Re: ComboBox Events

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!
Team Colleague
Reputation Points: 361
Solved Threads: 214
Taboo Programmer
Comatose is offline Offline
2,413 posts
since Dec 2004
Mar 30th, 2005
0

Re: ComboBox Events

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
Reputation Points: 10
Solved Threads: 0
Newbie Poster
gcc777 is offline Offline
3 posts
since Mar 2005
Mar 30th, 2005
0

Re: ComboBox Events

Ok, I'm Moving this thread to VB.Net
Team Colleague
Reputation Points: 361
Solved Threads: 214
Taboo Programmer
Comatose is offline Offline
2,413 posts
since Dec 2004
Mar 31st, 2005
0

Re: ComboBox Events

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
Reputation Points: 10
Solved Threads: 0
Junior Poster in Training
cpopham is offline Offline
65 posts
since Mar 2005
Apr 4th, 2005
0

Re: ComboBox Events

Quote originally posted by gcc777 ...
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.
Reputation Points: 11
Solved Threads: 0
Newbie Poster
goaldrush is offline Offline
15 posts
since Apr 2005
Apr 5th, 2005
0

Re: ComboBox Events

Quote ...
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.

Quote originally posted by goaldrush ...
Wait on are you using radio buttons and check boxes? If you are it should be rad or chk in a combo box.
Team Colleague
Reputation Points: 211
Solved Threads: 27
Master Poster
Paladine is offline Offline
793 posts
since Feb 2003
May 17th, 2007
0

Re: ComboBox Events

Click to Expand / Collapse  Quote originally posted by gcc777 ...
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
Reputation Points: 10
Solved Threads: 0
Newbie Poster
gaurav1004 is offline Offline
2 posts
since May 2007
May 17th, 2007
0

Re: ComboBox Events

how to write code in combobox
Reputation Points: 10
Solved Threads: 0
Newbie Poster
gaurav1004 is offline Offline
2 posts
since May 2007

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in VB.NET Forum Timeline: Problem with my Assignment
Next Thread in VB.NET Forum Timeline: InvalidOperationException was unhandled





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC