I want to make this short and sweet. I have a list of nodes: {name: 'node 1', child: [{name: 'node 1.1', child:[{name: 'node 1.1.1'}]}, {name: node 1.2} ]}, {name: 'node 3', child:[{name: 'node 3.1'}, {name: '3.2'}]}, {name: 'node 2', child:[] }. That's my list. If there is an error in there, it's probably because I didn't write it correctly according to my memory. Hope you get the idea.
$("#treetable_1").treetable({ expandable: true });
I then do these for loops:
for(int i = 0; i < list.length; i++){
var node = $("#treetable_1").treetable("node", i+1);
$("#treetable_1").treetable("loadBranch",node,
"
Hello everyone,
I want to make this short and sweet. I have a list of nodes: {name: 'node 1', child: [{name: 'node 1.1', child:[{name: 'node 1.1.1'}]}, {name: node 1.2} ]}, {name: 'node 3', child:[{name: 'node 3.1'}, {name: '3.2'}]}, {name: 'node 2', child:[] }. That's my list. If there is an error in there, it's probably because I didn't write it correctly according to my memory. Hope you get the idea.
$("#treetable_1").treetable({ expandable: true }); I then do these for loops: for(int i = 0; i < list.length; i++){ var node = $("#treetable_1").treetable("node", i+1); $("#treetable_1").treetable("loadBranch",node, "
for(int j = 0; j < list[i].child.length; j++){ var node = $("#treetable_1").treetable("node", i+1); if(!list[i].child[j].child.length){ $("#treetable_1").treetable("loadBranch",node, "<tr data-tt-id="+(i+1)+"."+(j+1)+" data-tt-parent-id="+(i+1)+">"+ "
for(int u = 0; u < list[i].child[j].child.length; u++){ $("#treetable_1").treetable("loadBranch",node, "<tr data-tt-id="+(i+1)+"."+(j+1)+"."+(u+1)+" data-tt-parent-id="+(i+1)+"."+(j+1)+">"+ "
Overall my result was this: Node 1 -Node 1.1 --Node 1.1.1 -Node 1.2
And nothing else. I don't get Node 3 and its children nor Node 2. Can you help me on this?
UPDATE: I noticed that my html tags aren't showing up. I hope you guys can see them though. If not, i don't know why they're not showing up.