title: How to activate dropdown arrow in individual Windows Form DataGridViewComboBoxCell
body: <p>I have a DataGridView in my Windows Form with 3 forms. The first 2 columns are uneditable, and the last column should be editable. Only <em>some</em> cells in Column #3 are set to combo boxes (they are of type DataGridViewComboBoxCell). Because not <strong>all</strong> cells in Column #3 are combo boxes, is there a way to individually invoke this dropdown in these cells? Right now I can only see a way to do this on a whole column, but not all cells in column #3 are comboboxes. In my example below, if the content in column #2 says &quot;Cell that requires combobox&quot;, then the cell in column #3 in that row should be a ComboBoxCell. Otherwise, it should just be an editable text cell. The code looks something like this:</p>
  <p>Column 1 | Column 2                                 | Column 3</p>
  <p>ex 1           | Cell that requires combobox        | [editable textbox]</p>
  <p>ex 2        | Cell that doesn't require combobox | [combobox dropdown]</p>
  <pre><code>DataGridView newdatagridview = new DataGridView();
  var column1 = new DataGridViewTextBoxCell();
  var column2 = new DataGridViewTextBoxCell();
  var column3 = new DataGridViewComboBoxCell();
  var row = new DataGridViewRow();
  column1.Value = &quot;ex1&quot;;
  column2.Value = &quot;ex2&quot;;
  column3.Value = column2.Value;
  row.Cells.Add(column1);
  row.Cells.Add(column2);
  if (column2.Value == &quot;Cell that requires combobox&quot;) {
    // add options for the dropdown
    column3.Items.Add(&quot;0&quot;);
    column3.Items.Add(&quot;1&quot;);
    column3.Items.Add(&quot;2&quot;);
    column3.Items.Add(&quot;3&quot;);
    column3.Items.Add(&quot;4&quot;);
    //column3.ReadOnly = false; &lt;- This didn't work
    row.Cells.Add(column3); //You only add a combocell if column2's value says &quot;Cell that requires combobox&quot;
  }
  newdatagridview.Rows.Add(row);
  </code></pre>