i am using asp.net gridview in header i have two columns
column select all employee | column select all employer
so i have two checkbox for two columns, so once it click on the select all employee it should only be selected for all employee and same goes with employer
but the below code is selecting both employee and employer if only select on employer.
function SelectAllCheckboxes(chk) {
$('#<%=gv.ClientID%>').find("input:checkbox").each(function () {
if (this != chk) { this.checked = chk.checked; }
});
}
function SelectAllCheckboxes1(chk) {
$('#<%=gv.ClientID%>').find("input:checkbox").each(function () {
if (this != chk) { this.checked = chk.checked; }
});
}
<asp:CheckBox ID="chkAll" runat="server" onclick="javascript:SelectAllCheckboxes(this);" />
<asp:CheckBox ID="chkAll1" runat="server" onclick="javascript:SelectAllCheckboxes1(this);" />
Select All Employers, theSelect All Employeesgets checked too?