[flexcoders] Flex Tree selectedItem is null issue

Saturday, December 31, 2011

 

This works, and tree.selectedItem is not null after assignment:

var nodeToSelect:XML = this.tree.dataProvider.getItemAt(0) as XML;

this.tree.expandItem(nodeToSelect, true);
this.tree.selectedItem = nodeToSelect; // NOT NULL

But this doesn't, when the tree 'selectedItem' is set to an xml sub node:

var node:XML = this.tree.dataProvider.getItemAt(0) as XML;
var nodeToSelect:XML = node.children()[0]; // valid value

this.tree.expandItem(n2, true);
this.tree.selectedItem = nodeToSelect; // NULL

How can I fix this?

Cheers.

__._,_.___
Recent Activity:
MARKETPLACE

Stay on top of your group activity without leaving the page you're on - Get the Yahoo! Toolbar now.

.

__,_._,___

0 comments:

Post a Comment