Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ValueMember of the ComboBox - Getting the Value ?

Status
Not open for further replies.

TerDavis

Technical User
Sep 18, 2002
36
US
Hey guys,

I set up my combobox properties
DisplayMember = "CodeValue"
ValueMember = "Code"...

and everything works great so I know they are using the
proper display and associated code values from the dataset.

The problem is - I want to access the actual 'value' that the ValueMember property is referencing.
So if the "Code" value is "REGULAR"...
Than what property of the combobox do I use to get the acutal value so I can do some additional testing ...
such as
if ( combobox.ValueMember = "REGULAR" )...
etc.
Currently, all i get is "Code" which is the column of the DS, so where does the combobox store the value ??

thanks,
-ter
 
The SelectedValue property will give you the value of the member property specified in the ValueMember property.

Chip H.


If you want to get the best response to a question, please check out FAQ222-2244 first
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top