Hi,
Databind the combobox.
Dim conn As SqlConnection
Dim strConn As String
Dim daCustomer As SqlDataAdapter
Dim ds As New DataSet
strConn = "Server = " & Environment.MachineName & ";"
strConn &= "Database = NorthWind;"
strConn &= "Integrated Security = SSPI;"
conn = New SqlConnection(strConn)
daCustomer = New SqlDataAdapter("Select * from Customers", conn)
daCustomer.Fill(ds, "Customers")
ComboBox2.DataSource = ds.Tables("Customers")
ComboBox2.DisplayMember = "CustomerID"
http://msdn.microsoft.com/library/de...boxcontrol.asp
Ken
----------------------------
"Prabhudhas Peter" <Pr*************@discussions.microsoft.com> wrote in
message news:FE**********************************@microsof t.com...
I need a ComboBox property like "ItemData" in VB.Net as in VB 6.0.
The Idea behind this question is, i've created a user control combo box in
vb.net with my own set of properties..now i want to store the data of a
column from the database into the Combo box with the corresponding ID field
(which is some other column of the same record)....
--
Peter...