when i click on a check box in header all the below checkbox should be checked : [enter image description here][1]


  [1]: https://i.stack.imgur.com/5fItf.png

Please help me out. My code is



Please help me out. My code is
<asp:TemplateColumn HeaderText="Delete" HeaderStyle-ForeColor="White">
                                                       <HeaderTemplate>
                                                           <asp:CheckBox ID="CheckBox3"  Checked="false" onclick="CheckAll(this)" AutoPostBack="true" runat="server" />
                                                       </HeaderTemplate>
                                                        <ItemTemplate>
                                                            <asp:CheckBox ID="chkDelete_SO" runat="server"  />
                                                        </ItemTemplate>
                                                        <HeaderStyle CssClass="SentinelGridHeader" />
                                                    </asp:TemplateColumn>


Please help me out. My code is
This is for my grid id
<asp:Panel ID="ShiftOverridePanel" runat="server">
                                            <asp:DataGrid ID="dgShiftOverrideData" runat="server" AllowPaging="True" AllowSorting="True" 
                                                OnSortCommand="Sort_Grid_SO" AutoGenerateColumns="False" Width="100%" OnItemCommand="dgShiftOverrideData_ItemCommand"
                                                OnPageIndexChanged="dgShiftOverrideData_PageIndexChanged" CssClass="Grid" DataKeyField="SOExceptionID">