Ok, that worked thanks Tracy!

at the expense of looking like a total idiot, I'll show you the janky way I did it though:

I created an XMLList from an xml string called XMLDoc.  I set the dataProvider of the tree with the XMLList then did this:
tree.expandItem(XMLDoc.children().parent(), true);

This seems retarded, and I know there's a very simple "hey, just access XMLDoc.root" type of thing, so that's why I'm posting this ;)

Thanks agian for the help,

On 6/1/06, John Grden <[EMAIL PROTECTED]> wrote:
Binding

Ah ok yeah ;) I'll try that - thanks Tracy


On 6/1/06, Tracy Spratt < [EMAIL PROTECTED]> wrote:

If you want to open the root tree node, use the root node of the dataProvider xml. Are you binding or using a result handler?

 

Tracy

 


From: [email protected] [mailto:[email protected]] On Behalf Of John Grden
Sent: Thursday, June 01, 2006 3:59 PM
To: [email protected]
Subject: Re: [flexcoders] Opening root node to show it's children just after loading data

 

Yeah, I saw that, but how do I get "item"?  That's what's throwing the error

tree.selectedItem = 0  - I get an error

Thoughts?

On 6/1/06, Tracy Spratt < [EMAIL PROTECTED]> wrote:

Use tree1.expandItem([item:Object],openorclose:Boolean).

 

item:Object would be the root node of the xml dataProvider.

 

Tracy

 


From: [email protected] [mailto:[email protected]] On Behalf Of John Grden
Sent: Thursday, June 01, 2006 2:42 PM
To: [email protected]
Subject: [flexcoders] Opening root node to show it's children just after loading data

 

This no longer works in beta3, any updates on how it's actually done?

 

Expanding a tree node

By default, the 

 
Tree
 control displays the root nodes of the 

 
tree
 when it first opens. If you want to expand a node of the 

 
tree
 when the 

 
tree
 opens, you can use the 

setIsOpen() method of the 

 
Tree
 control. The following example calls this method as part of the handler for the 

creationComplete
 event to expand the first root node of the 

 
tree
: <mx:Script>

    <![CDATA[

        function init

 
Tree
(){

            


 
tree
1.setIsOpen(

 
tree
1.getNodeDisplayedAt(0), true);

        }

        ]]>

    </mx:Script>



<mx:



 
Tree
 id="

 
tree
1" ... creationComplete="init

 
Tree
();" >

    ...

</mx:



 
Tree



--
John Grden - Blitz


--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com



SPONSORED LINKS

Web site design development

Computer software development

Software design and development

Macromedia flex

Software development best practice

 

 


YAHOO! GROUPS LINKS

 

 





--
John Grden - Blitz


--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com




SPONSORED LINKS
Web site design development Computer software development Software design and development
Macromedia flex Software development best practice


YAHOO! GROUPS LINKS






--
John Grden - Blitz



--
John Grden - Blitz

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com




SPONSORED LINKS
Web site design development Computer software development Software design and development
Macromedia flex Software development best practice


YAHOO! GROUPS LINKS




Reply via email to