I have an igTree defined as follows. The root node is being populated via the api call, however, no node has the icon so I can expand to view the children for the node. What else must I do to be able to expand a node? How do I tell the node to assume there are children, so include the expander icon?
$("#tree").igTree({ singleBranchExpand: false, height: "300px", width: "610px", checkboxMode: "triState", loadOnDemand: true,dataSourceType: "remoteUrl", dataSourceUrl: "/api/items", nodePopulating: function (event, ui) { debugger; $("#tree").igTree('option', 'dataSourceUrl', '/api/items/' + ui.data.id); return true; },bindings: { textKey: "Value", valueKey: "Key", primaryKey: "Key", checkedKey: "Checked", childDataProperty: "items", } });
Hi, Ray.
I've created a demo - igTree, with load on demand and only one root item, which is set as a data source after the tree is loaded. You can see that there is icon and you can expand the node. I hope that this demo will be useful for you. If you still has a problem, I will ask you to update the demo so that I can reproduce your problem and investigate it further.
Best regards,
Nikolay Alipiev
Software Devloper
This helped. I was not actually defining the child property since I was really gong to use it. Got it working. Thanks.