I\'m currently trying to add a ComboBox to a dataGridView.
In the DGV, there are 5 columns: checkbox, string, string, combobox, combobox.
both combobox-columns a
I'm not entirely clear what you're trying to do here, but if you're just trying to choose a value from the combobox for each row you add, you can choose an existing combobox value as a string.
If I have a two column datagridview, both with comboboxes that are pre-populated (I populated my comboboxes in the datagridview control itself by simply editing each column and adding my choices to the collection there), then I can do this:
Public Class Form1
Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click
Dim newRow(1) As Object
newRow(0) = "Foo"
newRow(1) = "Bar"
DataGridView1.Rows.Add(newRow)
End Sub
End Class
So "Foo" and "Bar" are already choices in the comboboxes. I can populate each row by simply referring to the choice I want by name. I would guess I could also do this by index number if I wanted to.
Hope this helps!