I have used the paging in the gridview.
I need the code for check/uncheck in gridview either in server side or client side.
I have tried without paging, it’s working. I need it with paging.
<asp:TemplateField>
<HeaderTemplate>
<asp:CheckBox ID="chkHGrid" runat="server" />
</HeaderTemplate>
<ItemTemplate>
<asp:CheckBox ID="chkGrid" runat="server" />
</ItemTemplate>
<ItemStyle HorizontalAlign="Center" />
<HeaderStyle HorizontalAlign="Center" />
</asp:TemplateField>
This technique is called maintaining the state of GridView CheckBox in Paging. One method to achieve this is as follows.
A simple example with Products Table, Northwind Database is given below
The Markup
The Code Behind