where ItemData in ComboBox?

  • Thread starter Thread starter Tark Siala
  • Start date Start date
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?
 
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...
 
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
 
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>.
 
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?
 
Back
Top