How can a linkbutton embedded within a gridview check a embedded checkbox on the same row?
<p>I have a gridview with 4 visible columns, the first visible column contains a link button which evaluates an ID and the fourth visible column contains a checkbox.</p>

<p>Preferably with javascript I'd like to check the corresponding checkbox (same row) when the link button is clicked while unchecking all other checkboxes in the gridview.</p>

<pre><code>&lt;asp:GridView ID="gdvSalesOrder" runat="server" Width="100%" HorizontalAlign="Center"
                            AutoGenerateColumns="false" CssClass="mGrid" PagerStyle-CssClass="pgr" AlternatingRowStyle-CssClass="alt"
                            SelectedRowStyle-CssClass="alt-backcolour"&gt;
                            &lt;Columns&gt;
                                &lt;asp:TemplateField Visible="false"&gt;
                                    &lt;ItemTemplate&gt;
                                        &lt;asp:TextBox ID="txtID" runat="server" Text='&lt;%# Eval("Id") %&gt;'&gt;&lt;/asp:TextBox&gt;
                                    &lt;/ItemTemplate&gt;
                                &lt;/asp:TemplateField&gt;
                                &lt;asp:CommandField Visible="false" ShowSelectButton="true" /&gt;
                                &lt;asp:TemplateField HeaderText="ORDER NUMBER" ItemStyle-Width="31%" ItemStyle-HorizontalAlign="Center"&gt;
                                    &lt;HeaderStyle HorizontalAlign="Center" /&gt;
                                    &lt;ItemTemplate&gt;
                                        &lt;asp:LinkButton ID="lnkOrderNumber" ClientIDMode="Static" runat="server" CommandName="select"
                                            CommandArgument='&lt;%# Eval("OrderNumber") %&gt;' Text='&lt;%# Eval("OrderNumber") %&gt;'&gt;&lt;/asp:LinkButton&gt;
                                    &lt;/ItemTemplate&gt;
                                &lt;/asp:TemplateField&gt;
                                &lt;asp:TemplateField HeaderText="ACCOUNT REF" ItemStyle-Width="31%" ItemStyle-HorizontalAlign="Center"&gt;
                                    &lt;HeaderStyle HorizontalAlign="Center" /&gt;
                                    &lt;ItemTemplate&gt;
                                        &lt;asp:Label ID="lblCustomerAccountReference" runat="server" Text='&lt;%# Eval("CustomerAccountReference") %&gt;'&gt;&lt;/asp:Label&gt;
                                    &lt;/ItemTemplate&gt;
                                &lt;/asp:TemplateField&gt;
                                &lt;asp:TemplateField HeaderText="QUOTED DUE DATE" ItemStyle-Width="31%" ItemStyle-HorizontalAlign="Center"&gt;
                                    &lt;HeaderStyle HorizontalAlign="Center" /&gt;
                                    &lt;ItemTemplate&gt;
                                        &lt;asp:Label ID="lblQuotedDueDate" runat="server" Text='&lt;%# Eval("QuotedDueDate", "{0:d}") %&gt;'&gt;&lt;/asp:Label&gt;
                                    &lt;/ItemTemplate&gt;
                                &lt;/asp:TemplateField&gt;
                                &lt;asp:TemplateField ItemStyle-Width="6%" ItemStyle-HorizontalAlign="Center"&gt;
                                    &lt;HeaderStyle HorizontalAlign="Center" /&gt;
                                    &lt;HeaderTemplate&gt;
                                        &lt;input id="chkAll" type="checkbox" onclick="javascript:SelectAllCheckboxes(this);" /&gt;
                                    &lt;/HeaderTemplate&gt;
                                    &lt;ItemTemplate&gt;
                                        &lt;asp:CheckBox ID="chkSelect" runat="server" /&gt;
                                    &lt;/ItemTemplate&gt;
                                &lt;/asp:TemplateField&gt;
                            &lt;/Columns&gt;
                            &lt;EmptyDataTemplate&gt;
                                No Sales Orders Found.
                            &lt;/EmptyDataTemplate&gt;
                        &lt;/asp:GridView&gt;
</code></pre>
