Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
945
Need JavaScript function to clear checkboxes
posted

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.