How to identify parent or child node ?

2 posts, 0 answers
  1. Manoj
    Manoj avatar
    75 posts
    Member since:
    Dec 2008

    Posted 22 Dec 2008 Link to this post

        I have to display some text if the node I clicked is only leaf node ( last node ) in the tree view . How can I identify the leaf node means it don't have child nodes.

    With Thanks & Regards
    Manoj Kumar Luha
  2. Yana
    Yana avatar
    4795 posts

    Posted 22 Dec 2008 Link to this post

    Hi Manoj,

    Please use the following code snippet:

    function OnClientNodeClicked(sender, args)  
                if(args.get_node().get_nodes().get_count() == 0)  
                    alert("Leaf node");  

    Best regards,
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Back to Top