Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ComboBox and ListBox
Message
 
To
27/11/2001 12:52:41
General information
Forum:
Visual Basic
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00586449
Message ID:
00586641
Views:
16
>Hello all. I am new to VB and VB.NET. I am working on displaying a lookup table in a combobox or a listbox in VB.NET. Is there any way to assign the index of the control to the primary key value in the table. I know there has to be some way to do it. Right now, I have a public array that holds the index value and the matching primary key and I have to find the selectedindex in the array to retrieve the primary key. There has to be a better way than that. Any suggestions? Thanks for the help!

If your key fits into a Long data type, you can use the ItemData property.
Éric Moreau, MCPD, Visual Developer - Visual Basic MVP
Conseiller Principal / Senior Consultant
Moer inc.
http://www.emoreau.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform