Answer:
When using hierarchical data source there is no need to define the HasChildren property in field settings of TreeView component. HasChildren field is used for parent-child mapping in self-referential data source.
Find the sample for Treeview using hierarchy data source from
here.