title: Adding child nodes to tree view based on single database table with parent/child links
body: <p>I'm trying to work out how to construct a tree view where child nodes are based on a single database table in which rows can link to other rows indicating the parent/child relationship.</p>
  
  <p>For example, given the table:</p>
  
  <pre>
  ID  ID_parent  Ten
  1   null       a
  2   1          b
  3   1          c
  4   null       d
  5   4          e
  6   4          f
  </pre>
  
  <p>I want show follow:</p>
  
  <pre>
  a
    b
    c
  d
    e
    f
  </pre>