I am trying to remove the arrow in the tree on the first level when there is no records.
I can remove it after the first level (second and beyond), because it calls the "LoadFiles" function and there I can control the HasChildren property.
Child items in this demo are loaded on demand - you don't know if you have items or not before you load them. In this demo however the items are loaded initially and if you change the Tree to show all employees you will notice that some of them are not expandable: