How do I assign an ID to items that are in a combobox?
I currently run the following loop to fill my combobox with items that are referred to by name (the items were retrieved from a database table):
Do While drFillControllerType.Read() cboControllerType.Items.Add(drFillControllerType.GetValue(0))
Loop
The above loop does only half of what I want it to do - that is, it creates items to be displayed in the combobox (a user friendly name is displayed).
The other half that I would like to do, is associate the names with an ID (the id value will also be derived from the database table). I will use this ID to reference a combobox item elsewhere in my code.
tia
I currently run the following loop to fill my combobox with items that are referred to by name (the items were retrieved from a database table):
Do While drFillControllerType.Read() cboControllerType.Items.Add(drFillControllerType.GetValue(0))
Loop
The above loop does only half of what I want it to do - that is, it creates items to be displayed in the combobox (a user friendly name is displayed).
The other half that I would like to do, is associate the names with an ID (the id value will also be derived from the database table). I will use this ID to reference a combobox item elsewhere in my code.
tia