"the access the SelectedValue property of the combobox to acess the Batch Number." should read "THEN access the SelectedValue property of the combobox to acess the Batch Number."
Main Topics
Browse All TopicsI have a combo box. I have bind a store procedure that shows different fields but when the user selects one row, there is only 1 field associated to the control and then accessed in the code for further queries. I want to access the other fields that were associated to the one selected by the user so for example:
ItemID -- Batch Number
001 1212
002
So the user selects 001, then I want to be able to access Batch number so if the batch # is present, then I can continue with query 1 and if batch # is not present I continue with query 2.
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
ok that will work if there was a batch number all the time but we will always have an item id but we will not always have a batch number. So I want to be able to use the batch number when present and the item number if the batch number is not present. I am working on a combo box from UltraGrid Infralogistics.
Thanks for your information. The control I am using comes from UltraGrid and they had a different way of accessing each cell and column. I figured I was able to access the value through their interface via the cell number instead of the selected value which is the recommended way in a standard combo box. Thanks for your help. LR
Business Accounts
Answer for Membership
by: Nash2334Posted on 2008-08-25 at 09:12:48ID: 22306694
A databound combobox has "DisplayMember" and "ValueMember" properties. You can set the DisplayMember to "ItemID" and ValueMember to "BatchNumber" (or whatever those data values are set to in your datasource), the access the SelectedValue property of the combobox to acess the Batch Number.