Hi team,
I'm on version 2009.2.701.35. I need a way to set the parent node to (checked) when all children are (checked).
What am I missing ?
Thanks,
DK
I'm on version 2009.2.701.35. I need a way to set the parent node to (checked) when all children are (checked).
| telerik:RadTreeView Skin="Web20" runat="server" ID="radTVBranches" CheckBoxes="true" |
| OnClientNodeChecked="AfterCheck"> |
| my ActerCheck function is written as this: |
| Format Code Block( |
| function |
| AfterCheck(sender, eventArgs) ( |
| var childNodes = eventArgs.get_node().get_nodes(); //get all the child nodes |
| var isChecked = eventArgs.get_node().get_checked(); //get all nodes that are checked |
| var node = eventArgs.get_node(); // get the parent node |
| // uncheck the parent if any child is unchecked. |
| if (!node.get_checked()) { |
| while (node.get_parent().set_checked != null) { |
| node.get_parent().set_checked( |
| false); |
| nodenode = node.get_parent(); |
| } |
| } |
| UpdateAll(childNodes, isChecked, node); |
| //update all nodes after check |
| } |
| ) |
What am I missing ?
Thanks,
DK