I have a RadTreeView set up so that the lowest level of the tree has a check box. It has many nodes so I have implemented the Page Methods functionality. I am trying to decrease the level of clicks by using the UncheckAllNodes() method on the tree. On tree load I have a javascript function that will hide the original node and I created a custom RadTreeNodeData class that has an object ShowCheckBox and Checked objects. When I call the UncheckAllNodes, I need it to be on the lowest level, instead what I'm getting is all nodes unchecked (expected), but the check boxes are showing up for the non-lowest level nodes. Is there a function I could call that will re-hide the check boxes, or a function that will un-check nodes that are checked? That way it won't affect the style I've applied to the nodes above?
function TreeViewLoad() {
var treeView = $find("<%=TreeView.ClientID%>");
if (treeView != null) {
var node = treeView.get_nodes().getNode(0); //get the first node
node.get_checkBoxElement().style.display = "none"; // hide the CheckBox
}
}
function OnClientNodeDataBoundHandler(sender, e) {
var node = e.get_node();
if (e.get_dataItem().ShowCheckBox) {
node.set_checked(e.get_dataItem().Checked);
}
else {
node.get_checkBoxElement().style.display = "none"; // hide the CheckBox
}
}