<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Expanding and collapsing Flex Tree nodes using the expandItem() and expandChildrenOf() methods</title>
	<atom:link href="http://blog.flexexamples.com/2007/12/02/expanding-and-collapsing-flex-tree-nodes-using-the-expanditem-and-expandchildrenof-methods/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.flexexamples.com/2007/12/02/expanding-and-collapsing-flex-tree-nodes-using-the-expanditem-and-expandchildrenof-methods/</link>
	<description>Just a bunch of Adobe Flex Examples</description>
	<lastBuildDate>Mon, 13 Feb 2012 01:38:13 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Jerry</title>
		<link>http://blog.flexexamples.com/2007/12/02/expanding-and-collapsing-flex-tree-nodes-using-the-expanditem-and-expandchildrenof-methods/comment-page-1/#comment-8607</link>
		<dc:creator>Jerry</dc:creator>
		<pubDate>Tue, 07 Dec 2010 03:17:24 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/12/02/expanding-and-collapsing-flex-tree-nodes-using-the-expanditem-and-expandchildrenof-methods/#comment-8607</guid>
		<description>callLater method is a good way to resolve the problem about scroll bar can not be seen. great job!</description>
		<content:encoded><![CDATA[<p>callLater method is a good way to resolve the problem about scroll bar can not be seen. great job!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: polloss</title>
		<link>http://blog.flexexamples.com/2007/12/02/expanding-and-collapsing-flex-tree-nodes-using-the-expanditem-and-expandchildrenof-methods/comment-page-1/#comment-7560</link>
		<dc:creator>polloss</dc:creator>
		<pubDate>Thu, 22 Apr 2010 15:40:31 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/12/02/expanding-and-collapsing-flex-tree-nodes-using-the-expanditem-and-expandchildrenof-methods/#comment-7560</guid>
		<description>For expanding the node after setting the dataProvider of after a dataChange you can call tree.validateNow() and then call the expandItem or expandChildrenOf methods. (The callLater approach hasn&#039;t worked for me)</description>
		<content:encoded><![CDATA[<p>For expanding the node after setting the dataProvider of after a dataChange you can call tree.validateNow() and then call the expandItem or expandChildrenOf methods. (The callLater approach hasn&#8217;t worked for me)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jayanthi</title>
		<link>http://blog.flexexamples.com/2007/12/02/expanding-and-collapsing-flex-tree-nodes-using-the-expanditem-and-expandchildrenof-methods/comment-page-1/#comment-7328</link>
		<dc:creator>jayanthi</dc:creator>
		<pubDate>Tue, 23 Mar 2010 11:10:07 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/12/02/expanding-and-collapsing-flex-tree-nodes-using-the-expanditem-and-expandchildrenof-methods/#comment-7328</guid>
		<description>once you set the dataprovider for the tree atonce expanding its nodes will not work so use callLater to make it work.
Example:
&lt;pre lang=&quot;actionscript3&quot;&gt;
tree.dataProvider=newDataProvoder;
callLater(openTree);
&lt;/pre&gt;
&lt;pre lang=&quot;actionscript3&quot;&gt;
        public function openTree():void {
            for each (var item:XML in tree.dataProvider.source) {
                if( item.children() != null ) {
                    tree.expandItem(item,true,false);
                }
            } 
        }
&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>once you set the dataprovider for the tree atonce expanding its nodes will not work so use callLater to make it work.<br />
Example:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;">tree<span style="color: #000066; font-weight: bold;">.</span>dataProvider=newDataProvoder<span style="color: #000066; font-weight: bold;">;</span>
callLater<span style="color: #000000;">&#40;</span>openTree<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span></pre></div></div>


<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;">        <span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #339966; font-weight: bold;">function</span> openTree<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span> <span style="color: #000000;">&#123;</span>
            <span style="color: #0033ff; font-weight: bold;">for</span> <span style="color: #0033ff; font-weight: bold;">each</span> <span style="color: #000000;">&#40;</span><span style="color: #6699cc; font-weight: bold;">var</span> item<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">XML</span> <span style="color: #0033ff; font-weight: bold;">in</span> tree<span style="color: #000066; font-weight: bold;">.</span>dataProvider<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">source</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span>
                <span style="color: #0033ff; font-weight: bold;">if</span><span style="color: #000000;">&#40;</span> item<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">children</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000066; font-weight: bold;">!</span>= <span style="color: #0033ff; font-weight: bold;">null</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span>
                    tree<span style="color: #000066; font-weight: bold;">.</span>expandItem<span style="color: #000000;">&#40;</span>item<span style="color: #000066; font-weight: bold;">,</span><span style="color: #0033ff; font-weight: bold;">true</span><span style="color: #000066; font-weight: bold;">,</span><span style="color: #0033ff; font-weight: bold;">false</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
                <span style="color: #000000;">&#125;</span>
            <span style="color: #000000;">&#125;</span> 
        <span style="color: #000000;">&#125;</span></pre></div></div>

]]></content:encoded>
	</item>
	<item>
		<title>By: alin.mircea</title>
		<link>http://blog.flexexamples.com/2007/12/02/expanding-and-collapsing-flex-tree-nodes-using-the-expanditem-and-expandchildrenof-methods/comment-page-1/#comment-6298</link>
		<dc:creator>alin.mircea</dc:creator>
		<pubDate>Mon, 09 Nov 2009 09:51:21 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/12/02/expanding-and-collapsing-flex-tree-nodes-using-the-expanditem-and-expandchildrenof-methods/#comment-6298</guid>
		<description>It`s my fault, don`t mind the above comment, dinamicly popupating the tree component kind of got in the way</description>
		<content:encoded><![CDATA[<p>It`s my fault, don`t mind the above comment, dinamicly popupating the tree component kind of got in the way</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: alin.mircea</title>
		<link>http://blog.flexexamples.com/2007/12/02/expanding-and-collapsing-flex-tree-nodes-using-the-expanditem-and-expandchildrenof-methods/comment-page-1/#comment-6297</link>
		<dc:creator>alin.mircea</dc:creator>
		<pubDate>Mon, 09 Nov 2009 09:37:37 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/12/02/expanding-and-collapsing-flex-tree-nodes-using-the-expanditem-and-expandchildrenof-methods/#comment-6297</guid>
		<description>As far as I know and have searched, tree.expandChildrenOf() does not have a max-depth. However , when calling it on a 10 +-5 lvls hierarchy it does not open all of them. Calling it on creationComplete opens up to lvl 4 , calling it on a click even opens up to lvl 7.  Is it just me? I will repost if I find the cause of this</description>
		<content:encoded><![CDATA[<p>As far as I know and have searched, tree.expandChildrenOf() does not have a max-depth. However , when calling it on a 10 +-5 lvls hierarchy it does not open all of them. Calling it on creationComplete opens up to lvl 4 , calling it on a click even opens up to lvl 7.  Is it just me? I will repost if I find the cause of this</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nick</title>
		<link>http://blog.flexexamples.com/2007/12/02/expanding-and-collapsing-flex-tree-nodes-using-the-expanditem-and-expandchildrenof-methods/comment-page-1/#comment-2056</link>
		<dc:creator>Nick</dc:creator>
		<pubDate>Wed, 05 Dec 2007 11:18:33 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/12/02/expanding-and-collapsing-flex-tree-nodes-using-the-expanditem-and-expandchildrenof-methods/#comment-2056</guid>
		<description>Is there any way to expand a tree in flex after a filter function has been run on it?  ie, a text box has a change event that filters the tree by the key stroke then, what nodes are left are automatically expanded.  I&#039;ve sorted out the filter function but, I can&#039;t get the tree to expand on what&#039;s left.  Their is a expand all and collapse all buttons but I would like the tree to expand by it&#039;s self after the filter function.  Any help for me? I&#039;d be very greatful.</description>
		<content:encoded><![CDATA[<p>Is there any way to expand a tree in flex after a filter function has been run on it?  ie, a text box has a change event that filters the tree by the key stroke then, what nodes are left are automatically expanded.  I&#8217;ve sorted out the filter function but, I can&#8217;t get the tree to expand on what&#8217;s left.  Their is a expand all and collapse all buttons but I would like the tree to expand by it&#8217;s self after the filter function.  Any help for me? I&#8217;d be very greatful.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

