G
Guest
I am using the following code as an example. Once the user selects an item
from the combobox (e.g., "Martin"), how can I access the value of that item
(e.g., "1")?
Thank you,
DD
Dim dtAdjuster as new DataTable
dtAdjuster.Columns.add("Names")
dtAdjuster.Columns.add("Keys")
dtAdjuster.loaddatarow(new object() {"Martin", "1"},true)
dtAdjuster.loaddatarow(new object() {"Cor","2"},true)
'This can all in probably hundred other ways, this is the way I do it.
Combobox1.datasource = dt
Combobox1.displaymember = "Names"
Combobox1.Valuemember = "Keys"
from the combobox (e.g., "Martin"), how can I access the value of that item
(e.g., "1")?
Thank you,
DD
Dim dtAdjuster as new DataTable
dtAdjuster.Columns.add("Names")
dtAdjuster.Columns.add("Keys")
dtAdjuster.loaddatarow(new object() {"Martin", "1"},true)
dtAdjuster.loaddatarow(new object() {"Cor","2"},true)
'This can all in probably hundred other ways, this is the way I do it.
Combobox1.datasource = dt
Combobox1.displaymember = "Names"
Combobox1.Valuemember = "Keys"