New to Telerik UI for ASP.NET AJAX? Start a 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:
JavaScript
// 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:
JavaScript
//node is a root node
if (node.get_level() == 0)