This is a migrated thread and some comments may be shown as answers.

Radtreeview parent checkboxes

1 Answer 72 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Samir
Top achievements
Rank 1
Samir asked on 08 Jul 2009, 08:31 PM
Hi -

 i have a radtreeview with checkboxes. I want to make sure that when the user checks all the child nodes manually, parent node should NOT get checked by itself, it should only have indeterminate state. Only if user manually checks the parent node, it should be checked. Thanks in advance.

1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 09 Jul 2009, 08:37 AM
Hello,

Try the following client side code and see whether it is working as expected.

JavaScript:
 
<script type="text/javascript">  
var parentNode;  
function OnClientNodeChecking(sender, args)  
{  
     if(args.get_node().get_parent() != sender)  
     {  
        parentNode = args.get_node().get_parent();  
        setTimeout("parentNode.get_checkBoxElement().className = 'rtIndeterminate';",10);  
     }       
}  
</script> 
Attach the OnclientNodeCkecking event to RadTreeView.

Thanks,
Princy.
Tags
TreeView
Asked by
Samir
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Share this question
or