3.2.0

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
September 20,
obj.setSelectionMode("multi"); // should work
Alex (ActiveWidgets)
September 21,
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
September 23,
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
September 24,
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)
September 24,

This topic is archived.

See also:


Back to support forum