Telerik UI for ASP.NET AJAX

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)