I don't think there is a property that will allow this, but I found an answer here that worked with a little modification.
Try adding the following 2 event handlers, a column called comboBoxColumn is assumed here:
private void dataGridView1_EditingControlShowing(object sender, DataGridViewEditingControlShowingEventArgs e) { ComboBox c = e.Control as ComboBox; if (c != null) c.DropDownStyle = ComboBoxStyle.DropDown; } private void dataGridView1_CellValidating(object sender, DataGridViewCellValidatingEventArgs e) { if (e.ColumnIndex == comboBoxColumn.Index) { object eFV = e.FormattedValue; if (!comboBoxColumn.Items.Contains(eFV)) { comboBoxColumn.Items.Add(eFV); dataGridView1.Rows[e.RowIndex].Cells[e.ColumnIndex].Value = eFV; } } }
Jeff ogata
source share