Three Ways to Define a TreeView: Markup (Progressive Enhancement), Existing TreeView Instance, and Object Literal

In this simple example you can see how to build TreeView Control instance from several different sources of data:

  1. an HTML list on the page;
  2. an existing TreeView instance's definition;
  3. a branch of an existing TreeView instance (e.g., from one of its nodes).

Tree from markup

 List 0
 item 0-1

Copy of the tree above taken from its own definition

 List 0
 item 0-1

Copy of the second branch of the tree at the top

 item 0-1

Tree built from a static definition

 Label 0
 text label 1
 branch 1
 Label 1-0
 branch 3