<script type="text/javascript"> var treeObj; $(function () { $("#treeView").ejTreeView({ expandOn:"",showCheckbox: true,nodeClick:"selectCheckBox"}); treeObj= $("#treeView").ejTreeView('instance'); }); function selectCheckBox(args) { if(args.currentElement.nodeName=="A") { var element=$(args.currentElement).parents("li.e-item")[0]; isChecked=$("#treeView").ejTreeView("isNodeChecked",element); !isChecked ? treeObj.checkNode(element):treeObj.uncheckNode(element); } } </script> |
Please check with the given sample and let us know if you have further queries.
Regards,
Sasikala Nagarajan