<h1>
    Lazy-Loading Nodes
</h1>

<p>
    Lazy loading is useful when you are dealing with large hierarchical
    data sources and would like to avoid the delays involved in loading
    the entire data set at once.
</p>
<p>
    The <b>TreeView</b> control makes lazy-loading super easy. Only two
    steps are required:
</p>
<ol>
    <li>
        Set the <b>items</b> property in the parent node data item to an
        empty array.
    </li>
    <li>
        Set the <b>TreeView's</b> <b>lazyLoadFunction</b> property to a
        function to be called when the user expands the node. This function
        takes two parameters: the parent node and a callback function to be
        invoked when the data becomes available.
    </li>
</ol>
<p>
    The tree in example below starts with three lazy-loaded nodes.
    When you expand them, the <b>lazyLoadFunction</b> is invoked.
    The function uses a timeout to simulate an http delay and
    returns data for three child nodes, one of which is also a
    lazy-loaded node.
</p>

@Html.C1().TreeView().Id("theTree")