RadControls for ASP.NET AJAX Use the following code to check whether a node or a treeview instance is returned by the get_parent() method:
CopyJavaScript
if (node.get_parent() == node.get_treeView())
or test the node level for zero:
CopyJavaScript
if (node.get_level() == 0)