I have data like this...
id->name->floor
1->store1->1
2->store2->1
3->store2->2
4->store2->3
5->store3->2
I want add it in the combobox
with display like this...
store1
store2
store3
When I choose store2 I want get valuemember = 2, 3, 4
I think a logic (I'm not yet try at code)...
When I choose store2 I just get valuemember = 2
after that I check at database
which id
have same name
in table. But I have 500++ data, so I think it's to waste process
Any idea??
note :
this is just sample form, i don't know how to code, i just make design
it will be helpfull if you give me implementation to combobox not to cmd
Do you want to be easy to retrieve the data in selected items? I prefer to fill data with its special type so that can get data directly from seleted items. because the
Combox.Item.Add()
function needs a prameter in Object type, so, I suggest that you can firstly define your data in a new type, like this:then, you can fill the data into combox in special type:
at last, you can get your data directly:
here is my result: