title: Return only the changed rows of a datagridview?
body: <p>I have a winform that contains a datagridview.  The form is totally disconnected from the data.  The codebehind calls a webservice, which returns a table.  That table becomes the datasource for the datagridview.  Once the datagridview is displayed, a user can edit whichever rows they desire.  Currently, when they hit the 'Update' button, every row in the grid is returned.</p>
  
  <p>Is there a way to return only the changed rows in the datagridview?</p>
  
  <p>UPDATE: Based off Tezzo's answer below, I was able to do this:</p>
  
  <pre><code>var changedRows = ((DataTable)dataGridView1.DataSource).GetChanges(DataRowState.Modified).Rows;
  </code></pre>