I have 2 treeviews and when I check something in one I need something to be checked in the other. The one that has the event is working and calling my checkNode(text) function. The checkNode function is executing everything correctly, except when it calls the node.check() nothing is happening. I made sure it is finding the node and has the right object, it is just not checking it. Code is below:
function
onNodeChecked(sender, args) {
var node = args.get_node();
if (node.get_checked()) {
if (node.get_text() == "Region") {
checkNode(
"Region");
checkNode(
"State");
}
}
}
function checkNode(text) {
var tree = $find("<%= ColumnTreeView.ClientID %>");
var node = tree.findNodeByText(text);
var nodetest = tree.findNodeByText("Region");
nodetest.check();
var nodes = tree.get_allNodes();
if (node != null) {
alert(
"checking something");
node.check();
}
}