8 Comments - Average Rating:4Comments:i want the parent node also a checkbox and if we select the parent one all the child nodes should also select and if i deselect one of the child node then it should deselect only the appropriate one not all
Rating: 4
Date Posted: July 26th, 2012
Great post! Helped me out a lot.
Rating: 5
Date Posted: April 29th, 2012
Well if it helps anyone , I think I have a fix for the keyboard nav issue.
What I did was created a custom Tree control and in it's constructor added:
super.addEventListener(ListEvent.CHANGE, treeListChangeHandler, false, 0, true);
Then in the handler:
private function treeListChangeHandler(event:ListEvent):void
{
(event.itemRenderer as ReportListTreeItemRenderer).setFocus();
}
I then added the following into my custom item renderer
override public function setFocus():void
{
super.setFocus();
checkBox.setFocus();
}
Hope that helps some folks out.
For the tree's "change" event issue I simply switched to the "itemClick" ListEvent instead as all the internal processing was done by that point and the XML dataProvider was updated.
Hopefully that helps some out!
Rating: 4
Date Posted: December 2nd, 2009
Thanks for this info. Couple of issues though. Using the arrow keys to navigate the tree and the spacebar to select items seems to keep focus at the last item you mouse clicked on. the only way I see to fix this is to write a custom tree control and handle the selectedIndex manually based on the checkbox selected (the XML data actually)
The other issues I'm trying to solve is how to have the tree dispatch the "change" event only after the checkbox click or change has fired. I want to handle the "change" event from the tree to update a master list of the items selected as they go.
Anyway, your post gave me a great start and it's appreciated.
Rating: 4
Date Posted: December 2nd, 2009
Thanks,but I have a problem: this demo can't respond the SpaceBar key.If you use the Down and the Spacebar to selected checkbox.
Rating: 3
Date Posted: December 2nd, 2009
Thanks for the post. These addChild techniques do not seem to work when the child component is larger than the typical node label.
Many other exmaples on the web try this and they fail on scrolling.
www.fonepays.com/flex/Rating: 4
Date Posted: November 13th, 2009
I've added the code to parse the data provider. Hope this helps.
Rating: 4
Date Posted: September 6th, 2009
How do you parse the tree to get the Save button to display which items are checked?
Rating: 4
Date Posted: September 6th, 2009