VB Dot NET Forum: combobox1.value member is not working w/ .displaymember - VB Dot NET Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

combobox1.value member is not working w/ .displaymember

#1 User is offline   Dido Icon

  • Newbie
  • Pip
Group:
Members
Posts:
2
Joined:
05-March 10

VB Knowledge: Decent
VB Version:
VB 2008 (.NET 3.0/3.5)
OS: Windows Vista x64

Posted 06 March 2010 - 05:56 AM

ComboBox1.DataSource = ds.Tables("Table")
ComboBox1.DisplayMember = "Name"
ComboBox1.ValueMember = "ID"

msgbox(combobox1.text)


when i run this, the message in the msgbox is "ID" not the value of the ID which i have selected..

it works when i remove one of it.. display/value member.. but i want to display the name and get the id..

please help me.. i just want to get the ID and add it to my database..
0

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users