:: Forum >>
AW.UI.Tree Multiselect
Alex,
Is it possible to get the Tree to support multi-select?
The code I am trying does not work.
<script type='text/javascript'>
var tree = {
0: [1, 2, 3, 4],
1: [5, 6],
2: [7],
3: [8],
4: [9]
}
var itemText = ["", "Node 1", "Node 2", "Node 3", "Node 4", "Node 5", "Node 6", "Node 7", "Node 8", "Node 9"];
var obj = new AW.UI.Tree;
obj.setItemText(itemText);
obj.setViewCount(function(i){return tree[i] ? tree[i].length : 0});
obj.setViewIndices(function(i){return tree[i]});
obj.setSelectionMode("multi-row");
obj.setSize(300, 400);
// Add images to indexed nodes.
obj.setItemImage(["", "home", "favorites", "fontsize", "search", "search"]);
document.write(obj);
</script>
Thanks
Matt
Thursday, September 20, 2007
obj.setSelectionMode("multi"); // should work
Alex (ActiveWidgets)
Friday, September 21, 2007
Thanks Alex,
That sort of works.
Every click now either selects or unselects (if already selected).
Unselecting leaves it grey until the next selection.
Is there any way to make the Tree select like the GRID using the Shift key and the Control key for multiple selections?
Single click should select only one node.
thanks
Matt
Sunday, September 23, 2007
Alex,
I also require that the tree supports virtual mode.
When I have about 2000 child nodes, the expansion is very slow.
Can you suggest how we can speed this up if the Tree doesn't support virtualMode?
thanks
Matt
Monday, September 24, 2007
The tree and list controls do not support virtual scrolling. I am planning to add this in the future, but currently it is not possible.
Alex (ActiveWidgets)
Monday, September 24, 2007
This topic is archived.
Back to support forum
Forum search