Hi Eric,
To add an item programmatically, you can do the following:
1. Add item to the Tree:
$('#jqxTree').jqxTree('addTo', { label: 'Item' });
2. Add a sub item to a specific tree item:
var treeItems = $("#jqxTree").jqxTree('getItems');var firstItem = treeItems[0];var firstItemElement = firstItem.element;$('#jqxTree').jqxTree('addTo', { label: 'Item' }, firstItemElement);
3. Add a sub item to a specific tree item by using the id of the item’s associated element:
var elementByID = $('#jqxTree').find("#home")[0];$('#jqxTree').jqxTree('addTo', { label: 'Item' }, elementByID);
‘home’ in the above code is the ID of a LI element.
<li id='home'>Home</li>
Hope this helps.
Best Regards,
Peter Stoev
jQWidgets Team
http://www.jqwidgets.com