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

How to identify parent or child node ?

1 Answer 45 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Manoj
Top achievements
Rank 1
Manoj asked on 22 Dec 2008, 02:31 PM
Hi,
    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

1 Answer, 1 is accepted

Sort by
0
Yana
Telerik team
answered on 22 Dec 2008, 02:51 PM
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,
Yana
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
TreeView
Asked by
Manoj
Top achievements
Rank 1
Answers by
Yana
Telerik team
Share this question
or