Hello, I have a treeview with OnClientNodeChecked event, I'm unable to check or uncheck the checkboxes in the tree. I have another tree which does not have an OnClientNodeChecked event, the checkboxes on this work fine, i'm able to check or uncheck.
Here is my OnClientNodeChecked event. each time I click on the checkbox the event is fired and it does return checked nodes, but i can't see them checked or unchecked on the UI. any help please?
function clientNodeChecked(sender, eventArgs) { |
var node = eventArgs.get_node(); |
var tree = node.get_treeView(); |
var checkedNodes = tree.get_checkedNodes(); |
var radioNodes; |
for (var i = 0; i < checkedNodes.length; i++) { |
if (checkedNodes[i] != node) { |
if (checkedNodes[i].get_parent() == node.get_parent()) { |
if(checkedNodes[i].get_parent().get_attributes().getAttribute("radio")=="yes") |
oldNode = checkedNodes[i]; |
} |
} |
} |
if (oldNode != null) { |
if (oldNode.get_parent() == node.get_parent()) { |
oldNode.set_checked(false); |
oldNode.set_expanded(false); |
} |
} |
node.set_checked(true); |
node.set_expanded(true); |
oldNode = node; |
} |
thank you,
Phani