title: Set RowState of a DataTable row to deleted
body: <p>I have an <code>UltraGrid</code> in my project, and I have an update function on the form to update the data in the database where the data is matching. </p>
  
  <p>The data in the grid is being stored as a <code>DataTable</code>. If a row of existing data is deleted from the <code>UltraGrid</code>, I want to be able to set the <code>RowState</code> of that row in the <code>DataTable</code> to 'RowState.Deleted<code>, so that in the Update function I can check the</code>RowState`, and if it's a deleted row, then deleted it, otherwise, update the data.</p>
  
  <p>How can I go about doing this? So far, I have the code below, but the count of rows being returned is 1 (or, the current number of rows in the grid) and not 2 (the number there was before I deleted one row).</p>
  
  <p>How and where in the code, do I set the <code>RowState</code> of the deleted row to be <code>RowState.Deleted</code>? Is there an alternative way of doing it using the <code>UltraGrid</code>?</p>
  
  <pre><code>dsProducts.Tables.Add(commDt.Copy) -- commDt is the DataTable linked to the UltraGrid
  tr = con.BeginTransaction(
  
    For Each dr As DataRow In dsProducts.Tables(0).Rows
      If dr.RowState = DataRowState.Deleted Then
       Try
  </code></pre>