Multiple Selected Items in a Tree Control in Flex.

To Access the multiple selected items in a Tree control we got to enable the multiple selection in the Tree control like below.

allowMultipleSelection=”true”

Then we can access the selectedItems of the Tree control with the property “selectedItems” like below code.

for(var i:int=0;i<tree.selectedItems.length;i++)
{
trace(tree.selectedItems[i].@NAME);
}

Here tree is the id of the Tree control and NAME is the attribute name of the dataProvider of the Tree control.Check the code for clearance.

Run Demo App.

Download Code Example.

One Response to “Multiple Selected Items in a Tree Control in Flex.”

  1. Mike Says:

    Just passing by.Btw, your website have great content!

Leave a Reply