<?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: Creating two related ComboBoxes</title>
	<atom:link href="http://blog.flexexamples.com/2007/08/04/creating-two-related-comboboxes/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.flexexamples.com/2007/08/04/creating-two-related-comboboxes/</link>
	<description>Just a bunch of Adobe Flex Examples</description>
	<lastBuildDate>Sat, 11 Feb 2012 11:51:51 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: mandy</title>
		<link>http://blog.flexexamples.com/2007/08/04/creating-two-related-comboboxes/comment-page-1/#comment-9399</link>
		<dc:creator>mandy</dc:creator>
		<pubDate>Sun, 17 Jul 2011 12:48:02 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/08/04/creating-two-related-comboboxes/#comment-9399</guid>
		<description>gr8 example....
i m searching for this code for a very long tym..
thanks a lot..:)</description>
		<content:encoded><![CDATA[<p>gr8 example&#8230;.<br />
i m searching for this code for a very long tym..<br />
thanks a lot..:)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rhys</title>
		<link>http://blog.flexexamples.com/2007/08/04/creating-two-related-comboboxes/comment-page-1/#comment-9257</link>
		<dc:creator>Rhys</dc:creator>
		<pubDate>Mon, 30 May 2011 03:02:06 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/08/04/creating-two-related-comboboxes/#comment-9257</guid>
		<description>I am trying to create an autocomplete textbox/combobox for streetnames. There are around 1.4M street addresses I want in there.  I have tried using XML for the datasource but it&#039;s too slow.  I was hoping I can use a table in SQL Server as the datasource instead.  I&#039;m sure this is possible but I am a Flex newbie and not sure how to do this.  Will it be any faster getting the data from SQL Server, than XML?</description>
		<content:encoded><![CDATA[<p>I am trying to create an autocomplete textbox/combobox for streetnames. There are around 1.4M street addresses I want in there.  I have tried using XML for the datasource but it&#8217;s too slow.  I was hoping I can use a table in SQL Server as the datasource instead.  I&#8217;m sure this is possible but I am a Flex newbie and not sure how to do this.  Will it be any faster getting the data from SQL Server, than XML?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mark b.</title>
		<link>http://blog.flexexamples.com/2007/08/04/creating-two-related-comboboxes/comment-page-1/#comment-9221</link>
		<dc:creator>mark b.</dc:creator>
		<pubDate>Fri, 13 May 2011 17:08:54 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/08/04/creating-two-related-comboboxes/#comment-9221</guid>
		<description>Thanks Pete for the init set up Works Great, but I need to take it one step further. Once a user gets to this page Im reading xml data to pre-populate the comboboxes so as to set Canada and Alberta. I have no issue getting Canada to show up but I cannot get the Alberta to show up. I have tried everything and still no answer.

pre-populate with this: parentDocument.getEvent.lastResult.events.event.manufacturer_state

Thanks, Mark</description>
		<content:encoded><![CDATA[<p>Thanks Pete for the init set up Works Great, but I need to take it one step further. Once a user gets to this page Im reading xml data to pre-populate the comboboxes so as to set Canada and Alberta. I have no issue getting Canada to show up but I cannot get the Alberta to show up. I have tried everything and still no answer.</p>
<p>pre-populate with this: parentDocument.getEvent.lastResult.events.event.manufacturer_state</p>
<p>Thanks, Mark</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Hugo Larcher</title>
		<link>http://blog.flexexamples.com/2007/08/04/creating-two-related-comboboxes/comment-page-1/#comment-9069</link>
		<dc:creator>Hugo Larcher</dc:creator>
		<pubDate>Sat, 19 Mar 2011 12:40:45 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/08/04/creating-two-related-comboboxes/#comment-9069</guid>
		<description>just to answer my question above:

&lt;pre lang=&quot;actionscript3&quot;&gt;
var selects:Array = [&#039;Country&#039;,&#039;State&#039;];

for (var i:int = 0; i &lt; selects.length; i++) {
	var formItem:FormItem = new FormItem();
	
	var comboBox:ComboBox = new ComboBox();
	comboBox.id = selects[i];
	comboBox.labelField = &#039;@name&#039;;
	if (i == 0) {
		comboBox.dataProvider = xml[selects[i]];
	} else if (parentCB is ComboBox) {
		BindingUtils.bindProperty(comboBox, &#039;dataProvider&#039;, parentCB, {name: &#039;selectedItem&#039;, getter: function (host:ComboBox):XMLList { return host.selectedItem.children(); }}, true);
	}
	formItem.addChild(comboBox);
	form.addChild(formItem);
}
&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>just to answer my question above:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #6699cc; font-weight: bold;">var</span> selects<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Array</span> = <span style="color: #000000;">&#91;</span><span style="color: #990000;">'Country'</span><span style="color: #000066; font-weight: bold;">,</span><span style="color: #990000;">'State'</span><span style="color: #000000;">&#93;</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
<span style="color: #0033ff; font-weight: bold;">for</span> <span style="color: #000000;">&#40;</span><span style="color: #6699cc; font-weight: bold;">var</span> i<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">int</span> = <span style="color: #000000; font-weight:bold;">0</span><span style="color: #000066; font-weight: bold;">;</span> i <span style="color: #000066; font-weight: bold;">&amp;</span>lt<span style="color: #000066; font-weight: bold;">;</span> selects<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">length</span><span style="color: #000066; font-weight: bold;">;</span> i<span style="color: #000066; font-weight: bold;">++</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span>
	<span style="color: #6699cc; font-weight: bold;">var</span> formItem<span style="color: #000066; font-weight: bold;">:</span>FormItem = <span style="color: #0033ff; font-weight: bold;">new</span> FormItem<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
	<span style="color: #6699cc; font-weight: bold;">var</span> comboBox<span style="color: #000066; font-weight: bold;">:</span>ComboBox = <span style="color: #0033ff; font-weight: bold;">new</span> ComboBox<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
	comboBox<span style="color: #000066; font-weight: bold;">.</span>id = selects<span style="color: #000000;">&#91;</span>i<span style="color: #000000;">&#93;</span><span style="color: #000066; font-weight: bold;">;</span>
	comboBox<span style="color: #000066; font-weight: bold;">.</span>labelField = <span style="color: #000066; font-weight: bold;">&amp;</span>#039<span style="color: #000066; font-weight: bold;">;</span>@name<span style="color: #000066; font-weight: bold;">&amp;</span>#039<span style="color: #000066; font-weight: bold;">;;</span>
	<span style="color: #0033ff; font-weight: bold;">if</span> <span style="color: #000000;">&#40;</span>i == <span style="color: #000000; font-weight:bold;">0</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span>
		comboBox<span style="color: #000066; font-weight: bold;">.</span>dataProvider = xml<span style="color: #000000;">&#91;</span>selects<span style="color: #000000;">&#91;</span>i<span style="color: #000000;">&#93;</span><span style="color: #000000;">&#93;</span><span style="color: #000066; font-weight: bold;">;</span>
	<span style="color: #000000;">&#125;</span> <span style="color: #0033ff; font-weight: bold;">else</span> <span style="color: #0033ff; font-weight: bold;">if</span> <span style="color: #000000;">&#40;</span>parentCB <span style="color: #0033ff; font-weight: bold;">is</span> ComboBox<span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span>
		BindingUtils<span style="color: #000066; font-weight: bold;">.</span>bindProperty<span style="color: #000000;">&#40;</span>comboBox<span style="color: #000066; font-weight: bold;">,</span> <span style="color: #000066; font-weight: bold;">&amp;</span>#039<span style="color: #000066; font-weight: bold;">;</span>dataProvider<span style="color: #000066; font-weight: bold;">&amp;</span>#039<span style="color: #000066; font-weight: bold;">;,</span> parentCB<span style="color: #000066; font-weight: bold;">,</span> <span style="color: #000000;">&#123;</span><span style="color: #004993;">name</span><span style="color: #000066; font-weight: bold;">:</span> <span style="color: #000066; font-weight: bold;">&amp;</span>#039<span style="color: #000066; font-weight: bold;">;</span>selectedItem<span style="color: #000066; font-weight: bold;">&amp;</span>#039<span style="color: #000066; font-weight: bold;">;,</span> getter<span style="color: #000066; font-weight: bold;">:</span> <span style="color: #339966; font-weight: bold;">function</span> <span style="color: #000000;">&#40;</span>host<span style="color: #000066; font-weight: bold;">:</span>ComboBox<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">XMLList</span> <span style="color: #000000;">&#123;</span> <span style="color: #0033ff; font-weight: bold;">return</span> host<span style="color: #000066; font-weight: bold;">.</span>selectedItem<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: #000000;">&#125;</span><span style="color: #000000;">&#125;</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #0033ff; font-weight: bold;">true</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
	<span style="color: #000000;">&#125;</span>
	formItem<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">addChild</span><span style="color: #000000;">&#40;</span>comboBox<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
	form<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">addChild</span><span style="color: #000000;">&#40;</span>formItem<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
<span style="color: #000000;">&#125;</span></pre></div></div>

]]></content:encoded>
	</item>
	<item>
		<title>By: Hugo Larcher</title>
		<link>http://blog.flexexamples.com/2007/08/04/creating-two-related-comboboxes/comment-page-1/#comment-9068</link>
		<dc:creator>Hugo Larcher</dc:creator>
		<pubDate>Sat, 19 Mar 2011 11:09:01 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/08/04/creating-two-related-comboboxes/#comment-9068</guid>
		<description>I was wondering how would you go about to do this dynamically, especially the data binding in actionscript.</description>
		<content:encoded><![CDATA[<p>I was wondering how would you go about to do this dynamically, especially the data binding in actionscript.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jeff</title>
		<link>http://blog.flexexamples.com/2007/08/04/creating-two-related-comboboxes/comment-page-1/#comment-9035</link>
		<dc:creator>Jeff</dc:creator>
		<pubDate>Fri, 11 Mar 2011 21:40:31 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/08/04/creating-two-related-comboboxes/#comment-9035</guid>
		<description>This does not work for me. Granted, the example at the top works on this web page. But when I try to reproduce it with SDK 3.5 - changing the selection on the first ComboBox only sometimes changes the list in the second ComboBox.

It is very irregular. I have tested and reproduced this in FB4 and FlashDevelop. FlashDevelop gives me an error &quot;unable to bind to property on class &#039;XML&#039; (class is not an IEventDispatcher)&quot;

What am I missing here? Thanks.</description>
		<content:encoded><![CDATA[<p>This does not work for me. Granted, the example at the top works on this web page. But when I try to reproduce it with SDK 3.5 &#8211; changing the selection on the first ComboBox only sometimes changes the list in the second ComboBox.</p>
<p>It is very irregular. I have tested and reproduced this in FB4 and FlashDevelop. FlashDevelop gives me an error &#8220;unable to bind to property on class &#8216;XML&#8217; (class is not an IEventDispatcher)&#8221;</p>
<p>What am I missing here? Thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Al</title>
		<link>http://blog.flexexamples.com/2007/08/04/creating-two-related-comboboxes/comment-page-1/#comment-8764</link>
		<dc:creator>Al</dc:creator>
		<pubDate>Tue, 21 Dec 2010 18:21:51 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/08/04/creating-two-related-comboboxes/#comment-8764</guid>
		<description>Great example!  How would this be done if you are not using an XML dataProvider for the Country ComboBox but are using a an ArrayCollection of Strings? So, based on the Country selection, you want to populate the State ComboBox with another ArrayCollection of Strings?</description>
		<content:encoded><![CDATA[<p>Great example!  How would this be done if you are not using an XML dataProvider for the Country ComboBox but are using a an ArrayCollection of Strings? So, based on the Country selection, you want to populate the State ComboBox with another ArrayCollection of Strings?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sridhar</title>
		<link>http://blog.flexexamples.com/2007/08/04/creating-two-related-comboboxes/comment-page-1/#comment-8341</link>
		<dc:creator>Sridhar</dc:creator>
		<pubDate>Mon, 20 Sep 2010 08:01:50 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/08/04/creating-two-related-comboboxes/#comment-8341</guid>
		<description>Appreciate your post! Loved it. Flex Examples to me has become a standard authority to refer for easy to understand examples of flex applications. Thank you sir.</description>
		<content:encoded><![CDATA[<p>Appreciate your post! Loved it. Flex Examples to me has become a standard authority to refer for easy to understand examples of flex applications. Thank you sir.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: leor</title>
		<link>http://blog.flexexamples.com/2007/08/04/creating-two-related-comboboxes/comment-page-1/#comment-8065</link>
		<dc:creator>leor</dc:creator>
		<pubDate>Sun, 04 Jul 2010 16:00:53 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/08/04/creating-two-related-comboboxes/#comment-8065</guid>
		<description>how can i get an url by selecting state? if i select ohio i want to call ohio.html, how ?</description>
		<content:encoded><![CDATA[<p>how can i get an url by selecting state? if i select ohio i want to call ohio.html, how ?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: flexnoob</title>
		<link>http://blog.flexexamples.com/2007/08/04/creating-two-related-comboboxes/comment-page-1/#comment-7679</link>
		<dc:creator>flexnoob</dc:creator>
		<pubDate>Tue, 11 May 2010 06:44:35 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/08/04/creating-two-related-comboboxes/#comment-7679</guid>
		<description>Hi! I came across this entry while looking for an answer to my problem with two comboboxes. 

My problem is about two side-by-side comboboxes which have the same data (same dataprovider?) When an item has already been selected in the first combobox, I need for the second combobox to automatically remove that selection in its list so that it will not be listed anymore on that second combobox&#039;s list. Can this be done? If so, please tell me how to do it. Thanks in advance.</description>
		<content:encoded><![CDATA[<p>Hi! I came across this entry while looking for an answer to my problem with two comboboxes. </p>
<p>My problem is about two side-by-side comboboxes which have the same data (same dataprovider?) When an item has already been selected in the first combobox, I need for the second combobox to automatically remove that selection in its list so that it will not be listed anymore on that second combobox&#8217;s list. Can this be done? If so, please tell me how to do it. Thanks in advance.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

