Display leaf nodes as folders

Is there a way to specify that the leaf nodes appear and function like folders? Or is it necessary to add a child node to each leaf node and then not display them using CSS?

Unfortunately it is not available to make the leaf nodes like “childfull” if they are “childless”.
You may try to use the dynamic loading mode:
https://docs.dhtmlx.com/tree__increasing_tree_s_performance.html
it allows to display “+” sign for the node that has ’ child=“1” '. But it will try to load these child nodes after clicking the “expand”.

All right. Is there a way to add a class to a node or is there a way to hide a node that is not needed?

Unfortunately such view formatting is not supported, due to the hierarchal structure of the tree.

I found a solution by changing the leaf node image to a folder:
myTree.setStdImages(“folderClosed.gif”,“folderOpen.gif”,“folderClosed.gif”);