Good Afternoon All,
I have a datagridview dgv1 that has a combobox column in it. Each row
should have an individual item to select from in the combobox. My code
displays the same values in all of them. Any help would be great!
Here's my code:
Dim dsMP As DataSet = New DataSet()
Dim intRow As Integer = 0
Dim intRows As Integer = dgvRO.Rows.Count
Dim strPartNumber As String = ""
Dim dt As DataTable = Nothing
Dim dr As DataRow = Nothing
For intRow = 0 To intRows - 1
strPartNumber = dgvRO.Rows(intRow).Cells("partno").Value
'LOAD DATASET WITH RESLOLUTION VALUES
With clsMP
.Owner = cboCompany.Text
dsMP = .GetAuthorizedVendors(strPartNumber)
End With
dgvRO.CurrentCell = dgvRO.Rows(intRow).Cells("cbovendor")
CType(dgvRO.Columns("cbovendor"),
DataGridViewComboBoxColumn).DataSource = dsMP.Tables(0)
CType(dgvRO.Columns("cbovendor"),
DataGridViewComboBoxColumn).DisplayMember = "vendor"
CType(dgvRO.Columns("cbovendor"),
DataGridViewComboBoxColumn).ValueMember = "vendor"
Next
dsMP.Dispose()
There are currently 5 rows. Each should have a different value in the
combobox, but they don't. What am I doing wrong???
Thanks.
jb