title: How to refresh GridView's data after update or delete operation in case of , GridControl.datasource = Datatable in Devexpress
body: <p>I have a devexpress gridview that is related to a table in a sql server database.  I am trying to refresh the gridview right after performing a delete but nothing I've tried so far has worked.  (I've verified that the delete operation has worked in the table).  I've tried 3 ways of updating the gridview but nothing has worked:</p>
  
  <pre class="lang-vb prettyprint-override"><code>GridControl1.Refresh()
  
  GridView1.RefreshData()
  
  GridControl1.RefreshDataSource()
  
  GridView1.RefreshEditor(True)
  </code></pre>
  
  <p>Here is the complete code of the whole operation:</p>
  
  <pre class="lang-vb prettyprint-override"><code>Using cnn As New SqlConnection(FrmGeneralConfig.GetInstance.getConnection())
      Try
          cnn.Open()
          Dim daDelete As New SqlDataAdapter
          Dim command As SqlCommand = New SqlCommand("DELETE FROM Client_Excepte_Charge_Min WHERE ClientNo = @ClientNo", cnn)       
          command.Parameters.AddWithValue("@ClientNo", clientNo)
          daDelete.DeleteCommand = command
          daDelete.DeleteCommand.ExecuteNonQuery()
          cnn.Close()
      Catch ex As Exception
          MessageBox.Show("Erreur: " &amp; ex.Message)
      Finally
          GridControl1.Refresh()
          GridView1.RefreshData()
          GridView1.RefreshEditor(True)
      End Try
  End Using
  </code></pre>