This is a migrated thread and some comments may be shown as answers.

parent or child node

1 Answer 23 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Sigma
Top achievements
Rank 1
Sigma asked on 11 Sep 2012, 12:05 PM
hi,
How to know the selected Node is parent node or Child node. Please help

regards

1 Answer, 1 is accepted

Sort by
0
Accepted
Princy
Top achievements
Rank 2
answered on 11 Sep 2012, 12:38 PM
Hi,

Try the following code to achieve your scenario.

JS:
<script type="text/javascript">
function OnClientNodeClicked(sender, args)
{
 if (args.get_node().get_level() == 0)
 {
  alert("Parent");
 }
}
</script>

Hope this helps.

Thanks,
Princy
Tags
TreeView
Asked by
Sigma
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Share this question
or