title: converting a negative value to 0
body: <p>I am working with a datagrid view, this datagrid view allows the user to edit cells, I want to set it up so that when a user inserts a negative value, it will convert this value to 0, what would be the best way to code this, i have created the followin code below, it appears to check for negative values, however it does not change the value to zero </p>
  
  <pre><code>if (Convert.ToInt32(dgvDetails.CurrentRow.Cells[2].Value.ToString()) &lt; -0)
                  {
                     intQtyInsp = 0;
                  }
                  else
                  {
                  intQtyInsp = Int32.Parse(row.Cells[2].Value.ToString());
  </code></pre>