title: Clear the DataGridView without loosing the source
body: <p>I have a form with DataGridView, dataSourced by dataTable. When i insert the record at the end i press the Clear button or form all fields (textboxes, comboboxes, DGV checkboxes) get cleared automatically when i press the save button.</p>
  
  <p>I normally clear the textboxes and comboboxes by writing:</p>
  
  <pre><code>textbox1.text = ""
  combobox1.text = ""
  </code></pre>
  
  <p>but when i do clear DGV with this like:</p>
  
  <pre><code>dgvPurchase.dataSource = nothing
  dgvPurchase.Refresh()
  </code></pre>
  
  <p>or
      dgvPurchase.rows.clear()</p>
  
  <p>It does clear the DGV but when i add new entry so DataGridView and data both do not appear into DGV. On the Form Load event I have the following code:</p>
  
  <pre><code>dtField = retrieveFull("ProductBasicInfo")
  
  cmbPurProdID.DisplayMember = "ProdName"
      cmbPurProdID.ValueMember = "ProdID"
      cmbPurProdID.DataSource = dtField
  
  
   dtPurchase.Columns.Add("ProdID")
   dtPurchase.Columns.Add("ProdName")
   dtPurchase.Columns.Add("RetailerID")
   dtPurchase.Columns.Add("RetailerName")
   dtPurchase.Columns.Add("UnitPrice")
   dtPurchase.Columns.Add("Qty")
   dtPurchase.Columns.Add("Amount")
  
   dgvPurchase.DataSource = dtPurchase
  </code></pre>
  
  <p>Please guide me that is there any way that my DataSource do not disturb or if I clear it so it also refresh the DataSource.</p>
  
  <p>This is the add button code, which adds the data into DataGridView</p>
  
  <pre><code> Try
  
          For a As Integer = 0 To dtPurchase.Rows.Count - 1
              If dtPurchase.Rows(a).Item("ProdID") = cmbPurProdID.SelectedValue Then
                  MessageBox.Show("This product is already enlisted")
                  Exit Sub
              End If
          Next
  
  
          dRow = dtPurchase.NewRow
  
          dRow.Item("ProdID") = cmbPurProdID.SelectedValue
          dRow.Item("ProdName") = cmbPurProdID.Text
          dRow.Item("RetailerID") = cmbPurRetailerID.SelectedValue
          dRow.Item("RetailerName") = cmbPurRetailerID.Text
          dRow.Item("UnitPrice") = txtPurUnitPrice.Text.Trim
          dRow.Item("Qty") = txtPurQty.Text.Trim
          dRow.Item("Amount") = txtPurAmount.Text.Trim
  
         dtPurchase.Rows.Add(dRow)
  </code></pre>