This sample page shows how to build a tree dynamically and apply the automatic tree layout algorithm.
Tree branches can be collapsed by clicking the [-] icon on the right of nodes.