Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
ComboBox and ListBox
Message
 
À
27/11/2001 12:52:41
Information générale
Forum:
Visual Basic
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00586449
Message ID:
00586641
Vues:
17
>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform