title: select only one checkbox in gridview and edit that checked row
body: <p>i have a gridview and which has one column as the asp checkbox control and i want the user can check one check box and click on the edit button to edit that perticular row </p>
  
  <p>my code for this is </p>
  
  <pre><code>                 &lt;asp:GridView runat="server" CssClass="width" ID="gvGrades" AutoGenerateColumns="false" ShowHeader="true" OnRowCancelingEdit="gvGrades_RowCancelingEdit"                            OnRowCommand="gvGrades_RowCommand" OnRowDataBound="gvGrades_RowDataBound" OnRowEditing="gvGrades_RowEditing"                               OnRowUpdated="gvGrades_RowUpdated" OnRowUpdating="gvGrades_RowUpdating" OnRowDeleting="gvGrades_RowDeleting"&gt;
                              &lt;Columns&gt;
                                  &lt;asp:TemplateField&gt;
                                      &lt;HeaderTemplate&gt;
                                          Select
  
                                      &lt;/HeaderTemplate&gt;
                                      &lt;ItemTemplate&gt;
                                          &lt;asp:CheckBox ID="chkSelect" class="asp" runat="server"  /&gt;
  
                                          &lt;asp:Label ID="lblId" runat="server" Text='&lt;%# Bind("id") %&gt;' Visible="false"&gt;&lt;/asp:Label&gt;
                                      &lt;/ItemTemplate&gt;
                                  &lt;/asp:TemplateField&gt;
                                  &lt;asp:TemplateField&gt;
                                      &lt;HeaderTemplate&gt;
                                          Grade Name
                                      &lt;/HeaderTemplate&gt;
                                      &lt;ItemTemplate&gt;
                                          &lt;asp:Label ID="lblName" runat="server" Text='&lt;%# Bind("grade_name") %&gt;'&gt;&lt;/asp:Label&gt;
                                      &lt;/ItemTemplate&gt;
  
                                   &lt;/asp:TemplateField&gt;
                                  &lt;asp:TemplateField&gt;
                                      &lt;HeaderTemplate&gt;
                                          Organization Name
                                      &lt;/HeaderTemplate&gt;
                                      &lt;ItemTemplate&gt;
                                          &lt;asp:Label ID="lblOrganizationName" runat="server" Text='&lt;%# Bind("organization_name") %&gt;'&gt;&lt;/asp:Label&gt;
                                      &lt;/ItemTemplate&gt;
                                  &lt;/asp:TemplateField&gt;
                                  &lt;asp:TemplateField&gt;
                                      &lt;HeaderTemplate&gt;
                                          Minimum Basic Salary
                                      &lt;/HeaderTemplate&gt;
                                      &lt;ItemTemplate&gt;
                                          &lt;asp:Label ID="lblSalary" runat="server" Text='&lt;%# Bind("min_basic_salary") %&gt;'&gt;&lt;/asp:Label&gt;
                                      &lt;/ItemTemplate&gt;
  
                                  &lt;/asp:TemplateField&gt;
                                  &lt;asp:TemplateField&gt;
                                      &lt;ItemTemplate&gt;
                                          &lt;asp:LinkButton runat="server" ID="lnkDelete" CommandName="Delete" Text="Delete"&gt;&lt;/asp:LinkButton&gt;
                                      &lt;/ItemTemplate&gt;
                                  &lt;/asp:TemplateField&gt;
                                  &lt;asp:TemplateField&gt;
                                      &lt;ItemTemplate&gt;
                                          &lt;asp:LinkButton runat="server" ID="lnkEdit" CommandName="Edit" Text="Edit"&gt;&lt;/asp:LinkButton&gt;
                                      &lt;/ItemTemplate&gt;
  
                                  &lt;/asp:TemplateField&gt;
                              &lt;/Columns&gt;
                          &lt;/asp:GridView&gt;
                      &lt;/fieldset&gt;
                  &lt;/ContentTemplate&gt;
              &lt;/asp:UpdatePanel&gt;
              &lt;asp:Button Text="Add" Width="70px" ID="btnAdd" runat="server" OnClick="btnAdd_Click" /&gt;&amp;nbsp;&amp;nbsp;
              &lt;asp:Button Text="Edit" ID="btnEdit" Width="70px" runat="server" OnClick="btnEdit_Click"
                  /&gt;
  </code></pre>
  
  <p>Please provide code for edit button click also </p>
  
  <p>thanks</p>