<div runat="server" id="single" style="font-weight:bold; width: 500px"> <asp:CheckBoxList ID="CheckBoxList2" Enabled="false" RepeatColumns="5" RepeatLayout="Table" runat="server" AutoPostBack="false" SelectionMode="Multiple" AppendDataBoundItems="true" DataTextField="customerName" DataValueField="code"> </asp:CheckBoxList>
<div class="op">function CheckAll() { // alert("checkall"); var intIndex = 0; var rowCount = document.getElementById('lstBranch').getElementsByTagName("input").length; for (i = 0; i < rowCount; i++) { if (document.getElementById('CheckBoxList1').checked == true) { if (document.getElementById("lstBranch" + "_" + i)) { if (document.getElementById("lstBranch" + "_" + i).disabled != true) document.getElementById("lstBranch" + "_" + i).checked = true; } } else { if (document.getElementById("lstBranch" + "_" + i)) { if (document.getElementById("lstBranch" + "_" + i).disabled != true) document.getElementById("lstBranch" + "_" + i).checked = false; } } } } function UnCheckAll() { // alert("uncheck"); var intIndex = 0; var flag = 0; var rowCount = document.getElementById('lstBranch').getElementsByTagName("input").length; for (i = 0; i < rowCount; i++) { if (document.getElementById("lstBranch" + "_" + i)) { if (document.getElementById("lstBranch" + "_" + i).checked == true) { flag = 1; } else { flag = 0; break; } } } if (flag == 0) document.getElementById('CheckBoxList1').checked = false; else document.getElementById('CheckBoxList1').checked = true; }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)