title: Update a datagridview having combobox with bindingsource
body: <p>I am using Vb.Net to load data from sql server database. I have the car datatable as follows:</p>
  
  <p><img src="https://i.stack.imgur.com/R5Dut.gif" alt="enter image description here"></p>
  
  <p>I load car details and distinct model values as follows:</p>
  
  <pre><code>sql = " select * from car"
  daCar = New SqlDataAdapter(sql, sqlConn)
  daCar.Fill(dsDataset, "car")
  
  sql = " select distinct model from car"
  daCar = New SqlDataAdapter(sql, sqlConn)
  daCar.Fill(dsDataset, "model")
  </code></pre>
  
  <p>Now when I load the form I have two bindingsources and have one combobox to display the distinct values of the model so user car modify data easily</p>
  
  <pre><code>bsCar = New BindingSource(dsDataset, "car")
  bsModel = New BindingSource(dsDataset, "model")
  dgvCars.DataSource = bsCar
  
  Dim col2 As New DataGridViewComboBoxColumn
  col2.HeaderText = "Model"
  col2.Name = "model"
  
  col2.DataSource = bsModel
  col2.DisplayMember = "model"
  col2.ValueMember = "model"
  col2.DataPropertyName = "model"
  
  col2.FlatStyle = FlatStyle.Flat
  dgvCars.Columns.Insert(2, col2)
  dgvCars.Columns(2).Width = 150
  </code></pre>
  
  <p>And also to be able to modify the contents of the combobx I have the following event:</p>
  
  <pre><code>Private Sub dgvCars_EditingControlShowing(ByVal sender As Object, ByVal e As System.Windows.Forms.DataGridViewEditingControlShowingEventArgs) _
          Handles dgvCars.EditingControlShowing
          If dgvCars.CurrentCell.ColumnIndex = 2
              Dim comboBox As ComboBox = TryCast(e.Control, ComboBox)
              comboBox.DropDownStyle = ComboBoxStyle.DropDown
          End If
      End Sub
  </code></pre>
  
  <p>Now every thing works perfect Except one problem:
  Whenever I try to make changes to the model combobox in the dgvCar, changes will return back to the old ones after losing focus!
  Also I cant add new records to the datagridview!
  How can I solve this problem?</p>