title: how to get dynamic check box status an asp in a gridview in asp webform?
body: <p>i have a gridview in a asp.net webform and i add it a check box column like this (the dataTable first column(0) is empty in sql data source and i add check boxes on the column cells):</p>
  
  <pre><code> protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
          {
              if (rowNum != 0)//except first row
              {
                  CheckBox cb = new CheckBox();
                  cb.Enabled = true;
                  e.Row.Cells[0].Controls.Add(cb);//row[0]=first clmn-and this event happend for all rows
  
              }
              rowNum++;
          }
  </code></pre>
  
  <p>now i have a dynamic check box column! and user should check some of them and click the submit then i need the row number of the checked check boxes.
  how can i do this?
  i tried this before:</p>
  
  <pre><code>DataTable editTable = new DataTable();
  editTable.Rows.Add(GridView1.Rows[0]);
  var x = editTable.Rows[0][0]; 
  </code></pre>
  
  <p>but the x cannot get the check box true or false! it seems that getting me the original field under the check box content.</p>
  
  <p>regards.</p>