<?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: Selecting multiple items in Flex List and DataGrid controls</title>
	<atom:link href="http://blog.flexexamples.com/2007/11/21/selecting-multiple-items-in-flex-list-and-datagrid-controls/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.flexexamples.com/2007/11/21/selecting-multiple-items-in-flex-list-and-datagrid-controls/</link>
	<description>Just a bunch of Adobe Flex Examples</description>
	<lastBuildDate>Sat, 13 Mar 2010 20:59:07 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Tamil Elamukil</title>
		<link>http://blog.flexexamples.com/2007/11/21/selecting-multiple-items-in-flex-list-and-datagrid-controls/comment-page-1/#comment-6560</link>
		<dc:creator>Tamil Elamukil</dc:creator>
		<pubDate>Wed, 09 Dec 2009 11:41:27 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/11/21/selecting-multiple-items-in-flex-list-and-datagrid-controls/#comment-6560</guid>
		<description>Hi,
How can I limit the selection. I have a combo box and depending on the value selected in the combo box I want to limit the multiple selection..

Thanks in advance.

Tamil</description>
		<content:encoded><![CDATA[<p>Hi,<br />
How can I limit the selection. I have a combo box and depending on the value selected in the combo box I want to limit the multiple selection..</p>
<p>Thanks in advance.</p>
<p>Tamil</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: deepak kumar shukla</title>
		<link>http://blog.flexexamples.com/2007/11/21/selecting-multiple-items-in-flex-list-and-datagrid-controls/comment-page-1/#comment-6006</link>
		<dc:creator>deepak kumar shukla</dc:creator>
		<pubDate>Tue, 13 Oct 2009 07:02:52 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/11/21/selecting-multiple-items-in-flex-list-and-datagrid-controls/#comment-6006</guid>
		<description>Excellent guys...it solved my problem.

Thankyou very much to all.</description>
		<content:encoded><![CDATA[<p>Excellent guys&#8230;it solved my problem.</p>
<p>Thankyou very much to all.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sami</title>
		<link>http://blog.flexexamples.com/2007/11/21/selecting-multiple-items-in-flex-list-and-datagrid-controls/comment-page-1/#comment-4306</link>
		<dc:creator>sami</dc:creator>
		<pubDate>Fri, 26 Jun 2009 16:40:47 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/11/21/selecting-multiple-items-in-flex-list-and-datagrid-controls/#comment-4306</guid>
		<description>Oops... the blog ate up my code (and I was too myopic to see the big red writing) - in Brian&#039;s code above, add the property in the XML tag allowMultipleSelection=&quot;true&quot; - or set the property when instatiating this object</description>
		<content:encoded><![CDATA[<p>Oops&#8230; the blog ate up my code (and I was too myopic to see the big red writing) &#8211; in Brian&#8217;s code above, add the property in the XML tag allowMultipleSelection=&#8221;true&#8221; &#8211; or set the property when instatiating this object</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sami</title>
		<link>http://blog.flexexamples.com/2007/11/21/selecting-multiple-items-in-flex-list-and-datagrid-controls/comment-page-1/#comment-4305</link>
		<dc:creator>sami</dc:creator>
		<pubDate>Fri, 26 Jun 2009 16:38:46 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/11/21/selecting-multiple-items-in-flex-list-and-datagrid-controls/#comment-4305</guid>
		<description>@Brian: Thanks a ton, you saved my day.. this is answer to &quot;How do you create a List that (de)selects items without the user holding down the cntl/ctrl/control key?&quot;

There is just one thing I need to add it, to allow the multiple selection that we need:








Another thing, for other people like me who are new to Flex and rusty with OOP/programming - this is a class defintion and is not an instantation - declare a separate component using this code and create an instance of this within your own code, otherwise you will get an error that says something different: &quot;1020: Method marked override must override another&quot; - basically this code tells the Flex runtime that Ctrl is pressed all the time</description>
		<content:encoded><![CDATA[<p>@Brian: Thanks a ton, you saved my day.. this is answer to &#8220;How do you create a List that (de)selects items without the user holding down the cntl/ctrl/control key?&#8221;</p>
<p>There is just one thing I need to add it, to allow the multiple selection that we need:</p>
<p>Another thing, for other people like me who are new to Flex and rusty with OOP/programming &#8211; this is a class defintion and is not an instantation &#8211; declare a separate component using this code and create an instance of this within your own code, otherwise you will get an error that says something different: &#8220;1020: Method marked override must override another&#8221; &#8211; basically this code tells the Flex runtime that Ctrl is pressed all the time</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ra</title>
		<link>http://blog.flexexamples.com/2007/11/21/selecting-multiple-items-in-flex-list-and-datagrid-controls/comment-page-1/#comment-4307</link>
		<dc:creator>ra</dc:creator>
		<pubDate>Tue, 23 Jun 2009 10:14:49 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/11/21/selecting-multiple-items-in-flex-list-and-datagrid-controls/#comment-4307</guid>
		<description>thanks</description>
		<content:encoded><![CDATA[<p>thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peter deHaan</title>
		<link>http://blog.flexexamples.com/2007/11/21/selecting-multiple-items-in-flex-list-and-datagrid-controls/comment-page-1/#comment-1972</link>
		<dc:creator>Peter deHaan</dc:creator>
		<pubDate>Thu, 30 Apr 2009 03:58:09 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/11/21/selecting-multiple-items-in-flex-list-and-datagrid-controls/#comment-1972</guid>
		<description>Zach/Monica,

Check out my co-worker Alex Harui&#039;s excellent blog post; &lt;a href=&quot;http://blogs.adobe.com/aharui/2008/01/selecteditem_and_combobox.html&quot; rel=&quot;nofollow&quot;&gt;&lt;u&gt;&quot;SelectedItem and ComboBox&quot;&lt;/u&gt;&lt;/a&gt;.

Peter</description>
		<content:encoded><![CDATA[<p>Zach/Monica,</p>
<p>Check out my co-worker Alex Harui&#8217;s excellent blog post; <a href="http://blogs.adobe.com/aharui/2008/01/selecteditem_and_combobox.html" rel="nofollow"><u>&#8220;SelectedItem and ComboBox&#8221;</u></a>.</p>
<p>Peter</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Zach</title>
		<link>http://blog.flexexamples.com/2007/11/21/selecting-multiple-items-in-flex-list-and-datagrid-controls/comment-page-1/#comment-1971</link>
		<dc:creator>Zach</dc:creator>
		<pubDate>Thu, 30 Apr 2009 01:13:49 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/11/21/selecting-multiple-items-in-flex-list-and-datagrid-controls/#comment-1971</guid>
		<description>I would like to reiterate Monica&#039;s question.  I cannot, for the life of me, after a couple hours searching on the Internet, find a way to programmatically select multiple items (i.e. from within Actionscript).  I set someListObject.selectedItems = [blah, blah].  Nothing happens.  There has to be a simple solution, but it appears not to be so simple.</description>
		<content:encoded><![CDATA[<p>I would like to reiterate Monica&#8217;s question.  I cannot, for the life of me, after a couple hours searching on the Internet, find a way to programmatically select multiple items (i.e. from within Actionscript).  I set someListObject.selectedItems = [blah, blah].  Nothing happens.  There has to be a simple solution, but it appears not to be so simple.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Brian</title>
		<link>http://blog.flexexamples.com/2007/11/21/selecting-multiple-items-in-flex-list-and-datagrid-controls/comment-page-1/#comment-1973</link>
		<dc:creator>Brian</dc:creator>
		<pubDate>Thu, 16 Apr 2009 19:42:52 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/11/21/selecting-multiple-items-in-flex-list-and-datagrid-controls/#comment-1973</guid>
		<description>Asked earlier and to anyone who comes after: How do you create a List that (de)selects items without the user holding down the cntl key?
&lt;pre class=&quot;code&quot;&gt;
&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
&lt;mx:List xmlns:mx=&quot;http://www.adobe.com/2006/mxml&quot;&gt;
    &lt;mx:Script&gt;
        &lt;![CDATA[
            import mx.controls.listClasses.IListItemRenderer;
            override protected function selectItem(item:IListItemRenderer, shiftKey:Boolean, ctrlKey:Boolean, transition:Boolean = true):Boolean {
                return super.selectItem(item, false, true, transition);
            }
        ]]&gt;
    &lt;/mx:Script&gt;
&lt;/mx:List&gt;
&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>Asked earlier and to anyone who comes after: How do you create a List that (de)selects items without the user holding down the cntl key?</p>
<pre class="code">
&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;mx:List xmlns:mx="http://www.adobe.com/2006/mxml"&gt;
    &lt;mx:Script&gt;
        &lt;![CDATA[
            import mx.controls.listClasses.IListItemRenderer;
            override protected function selectItem(item:IListItemRenderer, shiftKey:Boolean, ctrlKey:Boolean, transition:Boolean = true):Boolean {
                return super.selectItem(item, false, true, transition);
            }
        ]]&gt;
    &lt;/mx:Script&gt;
&lt;/mx:List&gt;
</pre>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sean</title>
		<link>http://blog.flexexamples.com/2007/11/21/selecting-multiple-items-in-flex-list-and-datagrid-controls/comment-page-1/#comment-1970</link>
		<dc:creator>Sean</dc:creator>
		<pubDate>Mon, 30 Mar 2009 21:04:19 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/11/21/selecting-multiple-items-in-flex-list-and-datagrid-controls/#comment-1970</guid>
		<description>Bryan S and Baris,

I really don&#039;t understand what you guys are doing here I tried this in about 15 different ways and I just don&#039;t understand on how to include it in what I posted above. Could you please look through what I posted and try to put whatever you are doing in code.  I get that you are sending a xml page to the php file however I am not in need of something like this.

I think I posted everything that one would need for the testing of the app. If you could please try it out and then post back the complete view so I can start to understand how this works would help me better. Thank you</description>
		<content:encoded><![CDATA[<p>Bryan S and Baris,</p>
<p>I really don&#8217;t understand what you guys are doing here I tried this in about 15 different ways and I just don&#8217;t understand on how to include it in what I posted above. Could you please look through what I posted and try to put whatever you are doing in code.  I get that you are sending a xml page to the php file however I am not in need of something like this.</p>
<p>I think I posted everything that one would need for the testing of the app. If you could please try it out and then post back the complete view so I can start to understand how this works would help me better. Thank you</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bryan S</title>
		<link>http://blog.flexexamples.com/2007/11/21/selecting-multiple-items-in-flex-list-and-datagrid-controls/comment-page-1/#comment-1974</link>
		<dc:creator>Bryan S</dc:creator>
		<pubDate>Mon, 16 Mar 2009 19:35:35 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/11/21/selecting-multiple-items-in-flex-list-and-datagrid-controls/#comment-1974</guid>
		<description>Sean :

Baris Guner&#039;s code does work for what to do, basically it just serializes it as XML and sends it.  I mod&#039;d his option a bit to shorten it and so I could use it in PHP with split() and process it in query. Here is how I handled it:

ActionScript
&lt;pre class=&quot;code&quot;&gt;
          private function sendSelected():void {
    		var xmlRequest:String;
    		var selectedItems:Array = myDataGrid.selectedItems;

		xmlRequest = &quot;&quot;;
    		for each(var item:Object in selectedItems){
        		xmlRequest += item.id + &quot;&#124;&quot;;
    		}
    		xmlRequest = xmlRequest.substr(0,(xmlRequest.length-1));
    		myService.request.items = xmlRequest;
    		myService.send()
	   }
&lt;/pre&gt;
---------------------------------
There is no need for the added requests either. Like in his HTTPService component.  So just fire the func off and process in your normal HTTPService comp. with URL and such..</description>
		<content:encoded><![CDATA[<p>Sean :</p>
<p>Baris Guner&#8217;s code does work for what to do, basically it just serializes it as XML and sends it.  I mod&#8217;d his option a bit to shorten it and so I could use it in PHP with split() and process it in query. Here is how I handled it:</p>
<p>ActionScript</p>
<pre class="code">
          private function sendSelected():void {
    		var xmlRequest:String;
    		var selectedItems:Array = myDataGrid.selectedItems;

		xmlRequest = "";
    		for each(var item:Object in selectedItems){
        		xmlRequest += item.id + "|";
    		}
    		xmlRequest = xmlRequest.substr(0,(xmlRequest.length-1));
    		myService.request.items = xmlRequest;
    		myService.send()
	   }
</pre>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
There is no need for the added requests either. Like in his HTTPService component.  So just fire the func off and process in your normal HTTPService comp. with URL and such..</p>
]]></content:encoded>
	</item>
</channel>
</rss>
