Javascript Treeview Checkbox Check All function

.net 2.0 rolled out with build in treeview control. It has many built in features like showing checkbox for all treeview node, formating the node. we code give the styles etc. We can enable the checkbox to select the node or leaf by just setting treeview ShowCheckBoxes=”All” property. We could observe one disadvantage is check all option missing. We could implement it using javascript method. We could find couple of javascript which provide the check all aption. You can find one good well tested javascript method to achive check all checkbox. It is bidirectional (ie Root to child node and chaild to root node check all option). You can find the below javascript implementation .

Javascript below method which you can add to your <head></head> tag.

In your code behinde Page load method just add below line to call the javascript method.

In above code tvDemo will be the treeview, has been declared on aspx page.

If you found any good idea or approach you can share with others.

Happy codding šŸ™‚

Similar Topics:


javascript treeview checkboxtreeview checkbox javascriptjquery treeview checkboxtreeview checkbox select all javascriptjavascript treeview with checkboxjavascript to check all checkboxes in treeview

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.