where ItemData in ComboBox?

T

Tark Siala

when i working on VB6 with ComboBox i use ItemData to save Id Number with
Visible Name, and use it to get Data from Database.
but now i working in VB.NET and se ComboBox, i can Fill Visible Name by
(ComboBox.items.Add "Name") but i dont know how fill hidden Data in Combo
because in VB.NET i dont know where ItemData, some one know it?
 
Z

zafar

when i working on VB6 with ComboBox i use ItemData to save Id Number with
Visible Name, and use it to get Data from Database.
but now i working in VB.NET and se ComboBox, i can Fill Visible Name by
(ComboBox.items.Add "Name") but i dont know how fill hidden Data in Combo
because in VB.NET i dont know where ItemData, some one know it?

Dear Tarek,
we have two properties of cumbo box as follow:
combobox.displayMember = "field_name"
and
combobox.valueMember = "field_name"

the field which you set in displayMember property will be shown in
combo box, and valueMember property will be hidden, when ever you need
that hidden value .. use combobox.value... Hope this would be much
useful to you...
 
Z

zafar

i know about this, but this option for Combo not for Items.

--
-----------
Tarek M. Siala







- Show quoted text -

ok, make your query more clear, I am not getting your problem exectly
 
H

Herfried K. Wagner [MVP]

Tark Siala said:
when i working on VB6 with ComboBox i use ItemData to save Id Number with
Visible Name, and use it to get Data from Database.
but now i working in VB.NET and se ComboBox, i can Fill Visible Name by
(ComboBox.items.Add "Name") but i dont know how fill hidden Data in Combo
because in VB.NET i dont know where ItemData, some one know it?

Check out the code snippets in
<URL:http://dotnet.mvps.org/dotnet/code/controls/#ItemData>.
 
A

Abdullahi Yahye

Tark Siala said:
when i working on VB6 with ComboBox i use ItemData to save Id Number with
Visible Name, and use it to get Data from Database.
but now i working in VB.NET and se ComboBox, i can Fill Visible Name by
(ComboBox.items.Add "Name") but i dont know how fill hidden Data in Combo
because in VB.NET i dont know where ItemData, some one know it?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top