I have a dataGridView with different columns. One of them is a ComboBoxColumn with default selections (English, German, Chinese…). I add new Rows programmatically to my datagridview.
dataGridView1.Rows.Add(sn, givenName, mail, department, ToDo);
the fifth column is my ComboBoxColumn where currently is written “ToDo”.
I would like to say which of my comboBoxItems should be selected. For example like this:
dataGridView1.Rows.Add(sn, givenName, mail, department, 1);
Now should be German selected in my comboBox. I set the Items at Form1.designer.cs.
Later on I would like to get the values which Item is selected for each Row.
You should be able to say:
See this MSDN page for an example of setting the
Items