title: about update data on datagridview and filter
body: <p>i'm getting confuse about dataset and dataview, which i either use dataset to update data or dataview to filter data, but cannot have both together at the same time.</p>
  
  <pre><code>Private Sub searchStaff_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
  
          ds = New DataSet
  
          dv = New DataView
  
          Dim ad As New SqlDataAdapter("SELECT * FROM staff", connection)
  
          ad.Fill(ds, "staff")
  
          dv.Table = ds.Tables("staff")
  
          Me.DataGridView1.DataSource = dv
  End Sub
  
  Private Sub txtSearch_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtSearch.TextChanged
  
           Try
                  dv.RowFilter = "StaffName like '" &amp; txtSearch.Text &amp; "*'"
  
            Catch ex As Exception
          End Try
        End Sub
  </code></pre>
  
  <p>this is the code of filtering data on dataview,which work fine for me.
  but later on, i have to implement another function of update data on datagridview, what i found on internet require me to use dataset as datasource rather than dataview.</p>
  
  <pre><code>Private Sub searchStaff_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
  
          connection = New SqlConnection(connectionString)
          ds = New DataSet
          cmd = New SqlCommand("SELECT * FROM staff", connection)
          adp=New SqlDataAdapter(cmd)
          adp.Fill(ds, "staff")
          Me.DataGridView1.DataSource = ds
          Me.DataGridView1.DataMember = "staff"
  
      End Sub
  Private Sub btnUpdate_ClickEvent(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnUpdate.ClickEvent
      Dim cmdbuilder As New SqlCommandBuilder(adp)
      Dim i As Integer
  
      Try
          i = adp.Update(ds, "staff")
          MsgBox("Record updated= " &amp; i)
  
      Catch ex As Exception
          MsgBox(ex.Message)
      End Try
  End Sub
  </code></pre>
  
  <p>so i hope some 1 can show me, how to i can have both functions"update,filter" at the same time by using what datasource?</p>