I can describe our method for delayed loading.
First, you must fill root nodes. Each node must contain a fake node with "Loading..." text. You must handle "expand" event. In this method, you can make $.post or another query to your webservice/database. Use will see "Loading" fake node while this query processing. Also, you can use node template for storing some information about node. Look to our template, for example (and see attach for screenshot of final treeview):
In expand event, you can look to hidden fields like this:
....
expand: function (e) { alert(nodeId(e.node)); },
...
Another two functions can be help get information about node:
Using of this method you can store different types of nodes in single tree and loading nodes at-the-fly.