title: C# Gridview CheckBox Field VS (Template Field + CheckBox)
body: <p>I got a <code>gridview</code> that pulls out a column of "Product" from the database.</p>
  
  <p>With that, I would need a <code>checkbox</code> for the user to "checked" against each product in the <code>gridview</code> when it's finished.</p>
  
  <p>I have research about <strong>CheckBox Field VS (Template Field + CheckBox)</strong> and decided to use <strong>(Template Field + CheckBox)</strong>  for the <code>gridview</code> to hold the <code>checkbox</code>.</p>
  
  <p>GridView Column[0] = Product Name
  GridView Column [1] = Checkbox</p>
  
  <p>After "checking" some <code>checkboxes</code>, then the user click submit which would trigger the event below.</p>
  
  <pre><code>string checkedBy;        
  foreach (GridViewRow row in grvCheckList.Rows)
  {
     // Im not sure how to check if each checkbox has been "checked" 
     // or not as it is in the gridview  cell.
  
     // what I like to have is
        if((checkbox in column[1]).checked == true)
        { 
          checkedBy = // Staff name 
          // my codes to store the staff name into database with respective to the product listed in             the gridview row 
         }
        else
        { 
          checkedBy = "NULL"
          // my code to store "NULL" into database with respect to the product listed in the gridview        row
        }
  }   
  </code></pre>
  
  <p>For usual <code>checkbox</code>, what I normally do is below</p>
  
  <pre><code>if(checkbox1.checked == true ) 
  else if(checkbox2.checked == true )
  else if(checkbox3.checked == true )
  etc
  </code></pre>
  
  <p>So the my question is how do I check if the <code>checkbox</code> in each row has been "checked" or not despite every row in the <code>gridview</code> uses the same <code>checkbox</code>. </p>