title: Code behind not picking up changes made to Checkbox on a Gridview on postback
body: <p>I have a gridview that has a template field containing a checkbox as one of the fields</p>
  
  <pre><code>&lt;asp:TemplateField HeaderText="Confirm Driver Details" FooterText="Confirm Driver Details"&gt;
      &lt;ItemTemplate&gt;
          &lt;asp:CheckBox ID="chkConfirmDetails" runat="server" MaxLength="100" Width="50px" Enabled="false" Checked="true"&gt;&lt;/asp:CheckBox&gt;
      &lt;/ItemTemplate&gt;
  &lt;/asp:TemplateField&gt;
  </code></pre>
  
  <p>Initially this is checked and not enabled. </p>
  
  <p>The user uploads a file which is loaded into an object and then bound to the gridview. On the RowDataBound event some validation is performed on the data. In certain cases if some of the validation fails I want to enable the checkbox and untick it. </p>
  
  <pre><code>CheckBox chkConfirmDetails = (CheckBox)e.Row.Cells[e.Row.Cells.Count - 2].FindControl("chkConfirmDetails");
  
  //If this is enabled then we just need to check whether it is ticked or not
  if (!chkConfirmDetails.Enabled)
  {
      if (!ValidateDriver(_uploadData.DriverData[e.Row.DataItemIndex], out driverValidationMessage))
      {
          Label label = new Label();
          label.Text = "Details of this Driver cannot be found&lt;br /&gt;Please double-check to see if the Driver Number, Date of Birth and PPSN are entered correctly&lt;br /&gt;If you are sure you have the correct details entered tick this box to confirm";
          e.Row.Cells[e.Row.Cells.Count - 2].Controls.Add(label);
          e.Row.Cells[e.Row.Cells.Count - 2].BackColor = System.Drawing.Color.Yellow;
          ((TableRow)e.Row.Cells[e.Row.Cells.Count - 2].Parent).BackColor = System.Drawing.Color.Red;
          chkConfirmDetails.Enabled = true;
          chkConfirmDetails.Checked = false;
          _numberOfInvalidCells++;
      }
  }
  </code></pre>
  
  <p>This all works fine, the checkbox becomes enabled and is unticked. </p>
  
  <p>The user can then choose to tick the box to confirm that the details are correct and re-validate the row. On each row of the datagrid there is a button that the user can click to perform this function. So when the user clicks the validate row button the above code is called again. This time the checkbox is enabled and may or may not be ticked depending on what the user has done. </p>
  
  <p>However when I get a reference to the checkbox by using the FindControl method it is still showing up as Not Enabled and Checked (even if it is enabled and Not Checked on the form)</p>
  
  <p>Can someone explain why this is occurring and a way to get the actual state of the checkbox?</p>
  
  <p>EDIT</p>
  
  <p>Looking at the Request.Form.AllKeys data, it has keys for most of the other template items in the gridview (textboxes and dropDownLists) but not the checkbox or the validate button</p>