Information générale
Catégorie:
Codage, syntaxe et commandes
Titre:
Storing and Retrieving Multiple Values With a List Box
I already have a working solution to this problem but I am sure there is a betetr way to do it.
I have a list box that displays 2 strings (inserted as one string into the list box using fixed-length strings). I am not using the ItemData as the unique ident is too large for the long type. I cannot use the unique SQL created ID as these tables are refreshed daily. So what I have done is as items are added to the listbox I have a dynamic array that is populated based on the ListIndex that contains all of the extra fields I need to work with but not show to the user. This is of course..... well crappy. If a programmer down the way to decide even to set the listbox control to Sorted then the array would be out of whack. I really don't want to use a grid control as I would like everything simply on one line.
I would like to know how some of the more seasoned developers would handle the situation of isplaying a list of choices to a user and accessing additional data without having to make an additional call to the database. Thanks.
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement