The TreeView_RemoveChildren() function removes the child nodes for the specified parent node.
TreeView_RemoveChildren(tree_view_field, node_ID)
• tree_view_field – The tree view containing the parent node.
• node_ID – A long integer specifying the ID of the parent node.
A long integer containing the number of child nodes removed. This value does not include the descendants of the child nodes removed.
To remove all nodes from a tree, specify TV_ROOT as the parent node.