title: How to find the index of selected row by checkbox in gridview?
body: <p>I have a gridview with 2 column then <code>cell[0]</code> has checkbox and <code>cell[1]</code> has data
  I want if checkbox checked and click button delete, find which the checkbox is checked and delete the the row.</p>
  
  <pre><code> &lt;asp:GridView ID="GridView1" runat="server"  AutoGenerateColumns="False" BackColor="White"
           BorderColor="Blue" BorderStyle="Solid" CellPadding="3" DataSourceID="SqlDataSource1"
           ForeColor="Black"  GridLines="Vertical" Width="656px" &gt;
          &lt;AlternatingRowStyle BackColor="#CCCCCC" /&gt;
          &lt;Columns&gt;
               &lt;asp:TemplateField&gt;
  
                   &lt;ItemTemplate&gt;
  
                       &lt;asp:CheckBox  runat="server" /&gt;
                   &lt;/ItemTemplate&gt;``
               &lt;/asp:TemplateField&gt;
              &lt;asp:BoundField DataField="picname" HeaderText="picname" SortExpression="picname" /&gt;
          &lt;/Columns&gt;
          &lt;FooterStyle BackColor="#CCCCCC" /&gt;
          &lt;HeaderStyle BackColor="#99FF66" Font-Bold="True" ForeColor="Black" BorderColor="#006600" /&gt;
          &lt;PagerStyle BackColor="#33CC33" ForeColor="#0066FF" HorizontalAlign="Center" BorderStyle="Dashed" /&gt;
          &lt;RowStyle BackColor="Lime" /&gt;
          &lt;SelectedRowStyle BackColor="#0066CC" Font-Bold="True" ForeColor="White" /&gt;
          &lt;SortedAscendingCellStyle BackColor="#F1F1F1" /&gt;
          &lt;SortedAscendingHeaderStyle BackColor="#808080" /&gt;
          &lt;SortedDescendingCellStyle BackColor="#CAC9C9" /&gt;
          &lt;SortedDescendingHeaderStyle BackColor="#383838" /&gt;
      &lt;/asp:GridView&gt;
  </code></pre>