VB.NET 2005 Combobox, Multiple Values per line
Posted on 2007-08-01
I have Visual Studio 2005 and am coding in vb.net.
On a form I have a combobox which is populated with values from a database.
In this particular example it is bound to the results from a dataset of room numbers. In the combobox once populated the values look like ,
Now is it possible to have in the combo box multiple information on each line. e.g. I want to have the room number and the type of room. eg.
501, Standard Double
502, Standard Twin
And then when ever one of these is selected from the drop down, I only want the LEFT hand side of the COMMA to display as the selected value, eg if i was to click on 502 from the dropdown, only '502' would display as the selectedtext value.
Any help hugely apreciated