New to Telerik UI for ASP.NET AJAX? Download free 30-day trial

Whether Node.get_parent Returns the Parent Node or the Parent Treeview

Use the following code to check whether a node or a TreeView instance is returned by the get_parent() method:

    // node is root node and get_parent() returns the parent TreeView
    if (node.get_parent() == node.get_treeView())    

or test the node level for zero:

//node is a root node  
if (node.get_level() == 0)  
In this article