I do this in the DataGridView_RowsAdded event
My code looks like this:
Dim qualifierCell As DataGridViewComboBoxCell =
DirectCast(gridAddTable.Rows(e.RowIndex).Cells(gtQualifier.Index), DataGridViewComboBoxCell)
'gridAddTable.Rows(e.RowIndex).Cells(gtQualifier.Index)
For t As Int32 = 0 To tableMnemonics.Count - 1
qualifierCell.Items.Add(tableMnemonics(t))
Next
Notes:
You may have noticed my use of gtQualifier.Index. I prefer using the actual name of the cell but you could also use Cell("gtQualifier") or just the index: Cell(0) in my case.
You can skip the DirectCast call (using the commented code directly after it), but then Visual Studio will warn you about an implicit cast (no big deal) In C# you need to explicitly cast because it does not do implicit casting. You would write:
(DataGridViewComboBoxCell)gridAddTable.Rows(e.RowIndex).Cells(gtQualifier.Index)
If you code this in the DataGridView_RowsAdded event, you will need to make sure that tableMnemonics is populated prior to the call to InitializeComponents because InitializeComponents adds the first new row. The InitializeComponents call is located in the New() subroutine in your .Designer file. (in C# New is in the FormName.cs file)
Alternatively, you could put this code in the UserAddedRow event. In this case you would need to populate the first added row in your form's Load event.