w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Using checkbox in nested listview. Parent checkbox selects all child checkbox using JQuery

Try This Code

  • JavaScript

function ChkAllItems() { var grdControl = document.getElementById('lvQuestionList'); var GrdInputs = grdControl.getElementsByTagName("input"); var ChkAll = document.getElementById('<%=chkCrcAuditGroup.ClientID%>'); for (var i = 0; i < GrdInputs.length; ++i) { if (ChkAll.checked == true) { GrdInputs[i].checked = true; } else { GrdInputs[i].checked = false; } } }





© Copyright 2018 w3hello.com Publishing Limited. All rights reserved.