title: DataGridView ComboBox Columns
body: <p>I have a datagridview that is populated by a dataset. I am attempting to add 3 columns that contains comboboxs with their own datasource which would also be a dataset.</p>
  
  <p>Removing CRUD control here is how I am attempting to add the combobox columns.</p>
  
  <pre><code>Private Sub GenComboBoxColumns()
      Dim priorityTypesDS As New DataSet()
      Dim serviceBoardsDS As New DataSet()
      Dim serviceTypesDS As New DataSet()
  
      priorityTypesDS = _objhost.GetDataSet("SELECT DISTINCT abc FROM foo ORDER BY abc")
      serviceBoardsDS = _objhost.GetDataSet("SELECT DISTINCT abc FROM bar ORDER BY abc")
      serviceTypesDS = _objhost.GetDataSet("SELECT DISTINCT abc, xyz FROM foobar ORDER BY xyz")
  
  
      If dataGridView_monitorMapping IsNot Nothing AndAlso dataGridView_monitorMapping.Rows.Count &gt; 0 Then
          Dim col_priority As New DataGridViewComboBoxColumn
          Dim col_serviceBoard As New DataGridViewComboBoxColumn
          Dim col_serviceType As New DataGridViewComboBoxColumn
  
          col_priority.DataSource = priorityTypesDS
          col_serviceBoard.DataSource = serviceBoardsDS
          col_serviceType.DataSource = serviceTypesDS
  
          dataGridView_monitorMapping.Columns.AddRange(col_priority, col_serviceBoard, col_serviceType)
  
      End If
  </code></pre>
  
  <p>End Sub</p>
  
  <p>However I am actually generating numerous columns which run off the view area contained within the datagridview (over 7 columns!) when their should only be 3.</p>
  
  <p>To help you understand what I am trying to accomplish take a look at this example below. Think of a combobox and its respective options noted as such (foo*Bar*FooBar*) => a combobox with 3 choices.</p>
  
  <pre><code>---------------------------------------------------------------------------------
  |Apple          | (plant*animal) |  (blue*green*red*etc)  |     (smooth*rough*) |
  |Steak          | (plant*animal) |  (blue*green*red*etc)  |     (smooth*rough*) |
  |Peach          | (plant*animal) |  (blue*green*red*etc)  |     (smooth*rough*) |
  ---------------------------------------------------------------------------------
  </code></pre>
  
  <p>As always; help is most appreciated! =)</p>