|
-
December 16th, 2011, 05:48 PM
#1
[RESOLVED] Combobox for Multiple columns; 1 column visible
I want the combobox control effect to provide a drop-down list of Customers. However, I need to make sure that each combobox.item relates to a customer in the database.
I wanted to be able to store (or otherwise associate) CustomerID with each combobox.item, where the items will only be the customer names. That way, when a customer is chosen by name, I will readily know the CustomerID.
I can run an array side-by-side (parallel to) the combobox if needed, but maybe someone knows a better way.
Thanks.
NM. The best method is to create a Class to allow combobox1.DisplayMember and comboBox1.Valuemember to be set to the Class's properties of ID and Name.
Last edited by JeffInTexas; December 16th, 2011 at 08:23 PM.
-
December 17th, 2011, 04:54 PM
#2
Re: Combobox for Multiple columns; 1 column visible
Thanks for sharing your answer. Please mark your thread resolved
-
December 20th, 2011, 06:57 PM
#3
Re: [RESOLVED] Combobox for Multiple columns; 1 column visible
Ah! I thought I did, but apparently, changing the title is not the way to do it. I figured it out.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|