all groups > vb.net > february 2005 >
You're in the

vb.net

group:

Newbe ValueMember property question


Newbe ValueMember property question Bruce A. Julseth
2/25/2005 10:43:54 PM
vb.net:
Sorry. The other post got sent before I was complete.

Does the ValueMember property in the ComboBox work like the DisplayMember
property. For example, if I set the properties:

comboBox1.DataSource = dataSet1
comboBox1.DisplayMember ="Employees.LastName"
comboBox1.ValueMember = "Employees.EmployeeID"

If I select from the box a "LastName", I can retrive that selected name. How
do I retrieve the "ValueMember" setting, ie the "EmployeeID" for the
selected "LastName."

Or, isn't that the way ValueMember works? Is so, how does it work and how is
it used. I'm looking for a replacement for the VB.Compatibility
"VB6.GetItemData."

Thank you..

Bruce

Newbe ValueMember property question: Found. selectedValue property Bruce A. Julseth
2/25/2005 11:02:55 PM

[quoted text, click to view]

Never mind. I found the answer.. selectedValue property

Thanks..

Bruce

AddThis Social Bookmark Button