Checkbox is not working 2nd page and more
Checkbox is not working 2nd page and more
HTML
<asp:GridView ID="GridView1" CssClass = "table table-bordered" DataKeyNames = "Contact_Id" AllowSorting="True" runat="server" AutoGenerateColumns="False" emptydatatext="No Data is Available">
<Columns>
<asp:TemplateField ItemStyle-HorizontalAlign = "center">
<HeaderTemplate>
<asp:CheckBox ID="chkCheckAll" runat="server" CssClass="iCheck-helper" name="CheckAll" OnCheckedChanged = "chkCheckAll_CheckedChanged" AutoPostBack="True"/>
</HeaderTemplate>
<ItemTemplate >
<asp:CheckBox ID="chkSelection" runat="server" CssClass="iCheck-helper"/>
</ItemTemplate>
<ItemStyle HorizontalAlign="Center" />
</asp:TemplateField>
<asp:BoundField HeaderText="District Name" DataField="District_Name" />
<asp:BoundField HeaderText="Type" DataField="Contact_Type" />
<asp:BoundField HeaderText="Name" DataField="Contact_Name" />
<asp:BoundField HeaderText="Mob No" DataField="Contact_No" />
<asp:BoundField HeaderText="Email Id" DataField="Email_Id" />
</Columns>
</asp:GridView>
vb
For Each row As GridViewRow In GridView1.Rows
If row.RowType = DataControlRowType.DataRow Then
Dim chkRow As CheckBox = TryCast(row.Cells(0).FindControl("chkSelection"), CheckBox)
If chkRow.Checked Then
Emp_Nos = Emp_Nos & row.Cells(4).Text.Trim & ","
Nos_Count += 1
is_Check = True
End If
End If
Next
2nd page showing checkbox is checked but on function values come checked is false (first 10 entry working fine, remaining (from 2 page) problems occurs.
Please help me..
I am using .net 3.5 framework using VB