Indexes for all items of Tree
Hi,
How can I get indexes for all items of Tree?
Is absent A11 and A12 (4: [5,6] ).
Thanks.
How can I get indexes for all items of Tree?
Is absent A11 and A12 (4: [5,6] ).
var tree = {
0: [1, 2, 3],
1: [4],
2: [7],
3: [8],
4: [5,6]
}
var obj = new AW.UI.Tree;
obj.setItemText(["", "A", "B", "C", "A1", "A11", "A12", "B1", "C1"]);
obj.setViewCount(function(i){return tree[i] ? tree[i].length : 0});
obj.setViewIndices(function(i){return tree[i]});
document.write(obj);
for(var x=0; x<=tree[0].length; x++)
{
for(var y=1; y<=tree[x].length; y++)
{
indItem=tree[x][y-1]
alert(obj.getItemText(indItem)+" "+ indItem);
}
}
Thanks.
Igor K.
September 12,