Hello, I am trying to reset the selectedNode property on the tree control after I have changed a value in the dataProvider with this retrieveNode() function... private function retrieveNode(theNode):TreeNode{ for(var index in theNode.getChildNodes()){ var node:TreeNode = TreeNode(theNode.getChildNodes()[index]); if(node.getData().periodID == view.txtPeriodID.text){ return theNode.getTreeNodeAt(index); } retrieveNode(node); } }
view.treeCalendar.selectedNode = retrieveNode(view.treeCalendar.dataProvider); why won't the treeCalendar.selectedNode property accept this value? But this getTreeNode() function will work? private function getTreeNode() { if (view.txtPeriodID.text != null) { var node:TreeNode = TreeNode(view.treeCalendar.dataProvider.getChildNodes()[0]); while (node != null) { if(node.getData().periodID == view.txtPeriodID.text){ return node; } node = TreeNode(node.getChildNodes()[0]); } } return null; } -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/