parent or child node

2 posts, 1 answers
  1. Sigma
    Sigma avatar
    87 posts
    Member since:
    Apr 2012

    Posted 11 Sep 2012 Link to this post

    hi,
    How to know the selected Node is parent node or Child node. Please help

    regards
  2. Answer
    Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 11 Sep 2012 Link to this post

    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
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top