Adding JQuery Hierachical Selection
Asp.Net TreeView control is a useful control when hierarchical data representation is required in an .aspx page. The Treeview control inherently supports enabling of checkboxes for node level selection. I came a across a problem where I needed a solution for the following,
1. Checking a node should cause all its child nodes to be selected.
2. Checking a node should cause all its parent nodes to be selected.
In order to this it was just a matter of adding a few lines of JQuery to the aspx page. Thanks to JQuery’s wealth of convenient methods it resulted in a few lines. Listed below is the javascript code for your reference.
You can download the DEMO solution from here.
Comments