fill DataGridView ComboBox Column

voda_freedom

Member
Joined
Mar 22, 2006
Messages
7
Programming Experience
1-3
I Use datagridview with a column its type ComboBox and when i fill a ComboBox in a row of the datagridview with items all ComboBox in the other rows of datagridview are fillesd with the same items.
I want to fill every ComboBox in every row of the datagridview seperatly,
i mean i want the items in the ComboBox in row 0 different from the items in the ComboBox in row 1 and so on
 
With what code do you set the items of a DatagridViewComboBoxCell ?
 
Ok, now I understand, I didn't think that was possible, but it's good if you need to fill all column combos one one go.
To do only one combobox cell at a time go for a specific row and cell like this:
VB.NET:
Dim dgvcc As DataGridViewComboBoxCell
dgvcc = DataGridView1.Rows(2).Cells(0)
dgvcc.Items.Add("comboitem1")
dgvcc.Items.Add("comboitem2")
 
Back
Top