I'm having trouble populating a combobox from a table. I do it probably 100 other times in this same program and there are no problems. When the box populates, it just displays System.Data.DataRowView
, even thought the display member is set properly. Any ideas?
Dim tbldoc As DataSet1.docHeaderDataTable
tbldoc = Me.DocHeaderTableAdapter.GetDoc(Convert.ToString(cmbModel.SelectedValue), Convert.ToString(cmbPart.SelectedValue), Convert.ToString(cmbManning.SelectedValue), Convert.ToString(cmbPosition.SelectedValue))
Me.cmbAssocID.Visible = True
Me.Label6.Visible = True
Dim _docID1, _docID2 As String
_docID1 = tbldoc.Rows(0).Item("docID")
_docID2 = tbldoc.Rows(1).Item("docID")
Dim tblIDs As DataSet1.trainingResultsDataTable
tblIDs = Me.TrainingResultsTableAdapter.GetAssocIDBydocID(Convert.ToString(_docID1), Convert.ToString(_docID2))
Me.cmbAssocID.DataSource = tblIDs
Me.cmbAssocID.DisplayMember = "assocID"
Me.cmbAssocID.ValueMember = "assocID"
Me.cmbDocument.DataSource = tbldoc
Me.cmbDocument.DisplayMember = "docType"
Me.cmbDocument.ValueMember = "docID"
The varialbes _docID1
and _docID2
are being populated correctly. In debug mode, I can see that. Also, Me.cmbDocument
is being populated properly from tbldoc
. And I have checked the spelling of "assocID" about 14 times. I'm stumped....