Click here to Skip to main content
15,922,533 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
dear friends
please help me
I have worked treeview1 control . my problem is all child node checked then root will be checked and IF one child node will checked then root will be checked.

phil.o 18-Jul-15 1:41am    
Not a question. What have you tried? Where are you stuck?

1 solution

Please refer the following sample code. May it helps...

var TreeView = "<%=TreeView1.ClientID %>"
var checkboxs = document.getElementById(TreeView).getElementsByTagName("INPUT")
  if(checkboxs[i].type == "checkbox"
    &&  checkboxs[i].name.substr(0,TreeView.length) == TreeView
    && checkboxs[i].checked )
      //Do what you want to do.
Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900