ComboBox Events

Please support our VB.NET advertiser: Programming Forums - DaniWeb Sister Site
Reply

Join Date: Mar 2005
Posts: 3
Reputation: gcc777 is an unknown quantity at this point 
Solved Threads: 0
gcc777 gcc777 is offline Offline
Newbie Poster

ComboBox Events

 
0
  #1
Mar 30th, 2005
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
Reply With Quote Quick reply to this message  
Join Date: Mar 2005
Posts: 32
Reputation: MrConfused is an unknown quantity at this point 
Solved Threads: 0
MrConfused MrConfused is offline Offline
Light Poster

Re: ComboBox Events

 
0
  #2
Mar 30th, 2005
I think you need to explain the problem in more detail; I don't understand the question.
Reply With Quote Quick reply to this message  
Join Date: Dec 2004
Posts: 2,413
Reputation: Comatose is a jewel in the rough Comatose is a jewel in the rough Comatose is a jewel in the rough Comatose is a jewel in the rough 
Solved Threads: 211
Team Colleague
Comatose's Avatar
Comatose Comatose is offline Offline
Taboo Programmer

Re: ComboBox Events

 
0
  #3
Mar 30th, 2005
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!
Reply With Quote Quick reply to this message  
Join Date: Mar 2005
Posts: 3
Reputation: gcc777 is an unknown quantity at this point 
Solved Threads: 0
gcc777 gcc777 is offline Offline
Newbie Poster

Re: ComboBox Events

 
0
  #4
Mar 30th, 2005
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
Reply With Quote Quick reply to this message  
Join Date: Dec 2004
Posts: 2,413
Reputation: Comatose is a jewel in the rough Comatose is a jewel in the rough Comatose is a jewel in the rough Comatose is a jewel in the rough 
Solved Threads: 211
Team Colleague
Comatose's Avatar
Comatose Comatose is offline Offline
Taboo Programmer

Re: ComboBox Events

 
0
  #5
Mar 30th, 2005
Ok, I'm Moving this thread to VB.Net
Reply With Quote Quick reply to this message  
Join Date: Mar 2005
Posts: 65
Reputation: cpopham is an unknown quantity at this point 
Solved Threads: 0
cpopham cpopham is offline Offline
Junior Poster in Training

Re: ComboBox Events

 
0
  #6
Mar 31st, 2005
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
Reply With Quote Quick reply to this message  
Join Date: Apr 2005
Posts: 15
Reputation: goaldrush is an unknown quantity at this point 
Solved Threads: 0
goaldrush's Avatar
goaldrush goaldrush is offline Offline
Newbie Poster

Re: ComboBox Events

 
0
  #7
Apr 4th, 2005
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.
Reply With Quote Quick reply to this message  
Join Date: Feb 2003
Posts: 793
Reputation: Paladine has a spectacular aura about Paladine has a spectacular aura about Paladine has a spectacular aura about 
Solved Threads: 26
Team Colleague
Paladine's Avatar
Paladine Paladine is offline Offline
Master Poster

Re: ComboBox Events

 
0
  #8
Apr 5th, 2005
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.

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.
Assistant Manager, Pharmacy Informatics
Wordpress Learning Blog
Updated : ASP.Net Login Code
Reply With Quote Quick reply to this message  
Join Date: May 2007
Posts: 2
Reputation: gaurav1004 is an unknown quantity at this point 
Solved Threads: 0
gaurav1004 gaurav1004 is offline Offline
Newbie Poster

Re: ComboBox Events

 
0
  #9
May 17th, 2007
Originally Posted by gcc777 View 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
how to write code for combobox
Reply With Quote Quick reply to this message  
Join Date: May 2007
Posts: 2
Reputation: gaurav1004 is an unknown quantity at this point 
Solved Threads: 0
gaurav1004 gaurav1004 is offline Offline
Newbie Poster

Re: ComboBox Events

 
0
  #10
May 17th, 2007
how to write code in combobox
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Other Threads in the VB.NET Forum


Views: 19503 | Replies: 10
Thread Tools Search this Thread



Tag cloud for VB.NET
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC