Adding Items to a ComboBox in a DataGridView

I have a DataGridView. It has two columns (0, 1). Column 1 is a ComboBox Column. How do I add items to the comboboxes in that column. I cannot find a method anywhere that will do this.

Thank you,
Troy L



Answer this question

Adding Items to a ComboBox in a DataGridView

  • Stankerific

    For instance:

    Column1.DataSource = New String() {"item1", "item2", "item3"}



  • maliger

    dim cboCol1 as dataGridViewComboBoxColumn

    cbocol1=datagridview1.colums.item(0)

    cbocol1.items.add("Item1")
    cbocol1.items.add("Item2")

  • Faraz_Ahmed

    get a reference to the column and use Items.Add() or DataSource property.

  • Adding Items to a ComboBox in a DataGridView