Hi,
is there a way to force tree to allow only one node set to be open at once?
thanks regards,
onan.
HI,
Wire up the client-side NodeExpanded event.
Here is javascript code that will allow only one nodeset to be expanded at a time.
function UltraWebTree1_NodeExpand(treeId, nodeId){ //Add code to handle your event here. // debugger; var node = igtree_getNodeById(nodeId); var tree = igtree_getTreeById(treeId); var level = node.getLevel(); if (level == 0) { var nodes = tree.getNodes(); for (var i = 0; i < nodes.length; i++) { if (nodes.Id != nodeId) nodes.setExpanded(false); } } // node.setExpanded(true);
Thanks for your reply much appreciated.
I tried your code and it throws an 'object doesnt support this property or method' error on the lines:-
if (nodes.Id != nodeId) nodes.setExpanded(false);
any suggestions please?
thanks again
regards,onan.