title: How to make a ComboBox of a DataGridViewComboBoxColumn accept user new items?
body: <p>Using a <strong>DataGridViewComboBoxColumn</strong>, the goal is to make the <strong>ComboBoxes</strong> accept user's new items and also the possibility of choosing items that are already present.</p>
  
  <p>I'm aware of using <strong>EditingControlShowing</strong> event of the <strong>DataGridView</strong> to change the <strong>DropDownStyle</strong> of the <strong>DataGridViewComboBoxEditingControl</strong> at run time to allow this, but I'm wondering if this can be done at a lower level.</p>
  
  <p>What I'm doing now is extending <strong>DataGridViewComboBoxColumn</strong>, <strong>DataGridViewComboBoxCell</strong> and <strong>DataGridViewComboBoxEditingControl</strong>, hoping to change the <strong>EditingControl's DropDownStyle</strong> in the moment I instantiate it. So far, no luck.</p>
  
  <p>The debugger shows the right assignment is being executed, but nonetheless, the <strong>DropDownStyle</strong> is popping at the <strong>EditingControlShowing</strong> (using the event for debugging purposes) as <em>DropBoxList</em>, not <em>DropBox</em>, which is the intent.</p>
  
  <p>Here follow the classes:</p>
  
  <pre><code>Public Class DataGridViewComboBoxColumnALT
      Inherits System.Windows.Forms.DataGridViewComboBoxColumn
  
      Public Sub New()
          Me.CellTemplate = New DataGridViewComboBoxCellALT
      End Sub
  End Class
  
  Public Class DataGridViewComboBoxCellALT
      Inherits System.Windows.Forms.DataGridViewComboBoxCell
      Public Overrides ReadOnly Property EditType() As Type
          Get
              Return GetType(DataGridViewComboBoxEditingControlALT)
          End Get
      End Property
  End Class
  
  Public Class DataGridViewComboBoxEditingControlALT
      Inherits System.Windows.Forms.DataGridViewComboBoxEditingControl
      Implements System.Windows.Forms.IDataGridViewEditingControl
      Public Sub New()
          MyBase.New()
          Me.DropDownStyle = ComboBoxStyle.DropBox
      End Sub
  End Class
  </code></pre>