ProjectExplorer
Programmer
I have Combobox which is filled via a dataset and datatable as follows.
'Get table from the dataset
DT = DS.Tables(0)
'Fill the ComboBox
With cboMediaCode
.DataSource = DT
.ValueMember = "MID"
.DisplayMember = "MediaCode"
End With
How do I retrieve the ValueMember ("MID") value?
I am using cboMediaCode.SelectedItem but am getting this error: "Conversion from type 'DataRowView' to type 'String' is not valid."
It was all going so well!! Please help.
'Get table from the dataset
DT = DS.Tables(0)
'Fill the ComboBox
With cboMediaCode
.DataSource = DT
.ValueMember = "MID"
.DisplayMember = "MediaCode"
End With
How do I retrieve the ValueMember ("MID") value?
I am using cboMediaCode.SelectedItem but am getting this error: "Conversion from type 'DataRowView' to type 'String' is not valid."
It was all going so well!! Please help.