title: Checking a column value when updating a gridview asp.net
body: <p>I'm trying to do some error handling on a column to see if it's not equal to a certain word. I'm wondering though do i do this on the RowUpdating event or the RowUpdated event. I've been trying to do this in the rowupdating event and haven't had any luck so far. Here's the code.</p>
  
  <pre><code>      TableCell cell = GridView1.Rows[e.RowIndex].Cells[3];
  
          if(cell.Text == "hello")
          {
              e.Cancel = true;
          }
          lblError.Text = "hello" + cell.Text;
  </code></pre>
  
  <p>I assume the 3 after inside the brackets after .Cells is the column index that I want. If i use .Cells[1] it will show the primary key no in the label, but if I try 2 or 3 nothing seems to be getting placed inside the cell variable.
  My table has four columns, ID, Name, Price, and CategoryID. Any help is appreciated.</p>