Hello,
I need to be able to clear out all checkboxes in my treeview via javascript. I tried guessing on what the function might be:
var control = $find('<%=selectuser.ClientID %>');checkedItems = control.get_checkedNodes();for (var i = 0; i < checkedItems.length; i++) { checkedItems[i].set_checkState() = 0;}
but this didn't work as the items still displayed a check in the checkbox. Can I please be given the syntax to clearing out all checkboxes on clientside?
Thanks.
Hello Shane,
Thank you for posting in the community.
As set_checkState is a function the desired state value should be passed as a parameter to it.
Please note that after unchecking a node, the checked nodes collection of the tree would also be automatically updated. Below is a sample function for deselecting all tree nodes:
Hope this helps.
Please feel free to contact me if you are still experiencing any issues with this scenario.