I want to use a combobox where one column would be an ID and the other column the data,
Here is FillCombo code that I'm trying to make work. Problem is "selectedValue" always returns nothing.
Dim i As Integer, M As String
For i = 0 To 19
cboBookmarks.SelectedValue = "Id" & Str(i)
M = "Data" & Str(i)
cboBookmarks.SelectedText = M
cboBookmarks.Text = "item"
Private Sub cboBookmarks_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cboBookmarks.SelectedIndexChanged
Dim index As Integer = cboBookmarks.SelectedIndex
Dim Item As String = cboBookmarks.SelectedItem
Dim Value As String = cboBookmarks.SelectedValue
MsgBox("Selected = '" & Item & "', and the ID Value ='" & Value & "'")
Can someone explain what I'm doing wrong, and provide a sample that works?