I bind a datatable to the combobox.DataSource on load. I then give the combobox a DisplayMember and a ValueMember (2 different columns out of the datatable). In the SelectedIndexChanged of the combobox I would like to use the SelectedValue property of the combobox, just to test I MsgBox(combobox.SelectedValue) and I get "Argument 'Prompt' cannot be converted to type 'String'." Why isn't it displaying the value? :(
OnLoad
cbCISoftware.DataSource = dbMaps.Tables("maps")
cbCISoftware.ValueMember = "id"
cbCISoftware.DisplayMember = "name"
SelectedIndexChanged of cbCISoftware
MsgBox(cbCISoftware.SelectedValue)
SelectedValue.ToString outputs
System.Data.DataRowView