<?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: Dragging rows between two different Flex DataGrid controls</title>
	<atom:link href="http://blog.flexexamples.com/2007/09/19/dragging-rows-between-two-different-flex-datagrid-controls/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.flexexamples.com/2007/09/19/dragging-rows-between-two-different-flex-datagrid-controls/</link>
	<description>Just a bunch of Adobe Flex Examples</description>
	<lastBuildDate>Sun, 12 Feb 2012 19:26:49 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Anonymous</title>
		<link>http://blog.flexexamples.com/2007/09/19/dragging-rows-between-two-different-flex-datagrid-controls/comment-page-1/#comment-8527</link>
		<dc:creator>Anonymous</dc:creator>
		<pubDate>Fri, 05 Nov 2010 03:59:50 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/09/19/dragging-rows-between-two-different-flex-datagrid-controls/#comment-8527</guid>
		<description>Hi

Just wondering if there is a way to achieve the same functionality, but in Flash CS4 or 5  using AS3 (and possibly AIR)?

Thanks

Shaun Thomson</description>
		<content:encoded><![CDATA[<p>Hi</p>
<p>Just wondering if there is a way to achieve the same functionality, but in Flash CS4 or 5  using AS3 (and possibly AIR)?</p>
<p>Thanks</p>
<p>Shaun Thomson</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jay</title>
		<link>http://blog.flexexamples.com/2007/09/19/dragging-rows-between-two-different-flex-datagrid-controls/comment-page-1/#comment-8423</link>
		<dc:creator>Jay</dc:creator>
		<pubDate>Sat, 09 Oct 2010 12:10:22 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/09/19/dragging-rows-between-two-different-flex-datagrid-controls/#comment-8423</guid>
		<description>Hi Guys,

   How to pass details from one datagrid to another which is in another mxml component.

Thanks in advance.</description>
		<content:encoded><![CDATA[<p>Hi Guys,</p>
<p>   How to pass details from one datagrid to another which is in another mxml component.</p>
<p>Thanks in advance.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sorry did not notice the chevrons</title>
		<link>http://blog.flexexamples.com/2007/09/19/dragging-rows-between-two-different-flex-datagrid-controls/comment-page-1/#comment-7770</link>
		<dc:creator>Sorry did not notice the chevrons</dc:creator>
		<pubDate>Fri, 21 May 2010 14:13:05 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/09/19/dragging-rows-between-two-different-flex-datagrid-controls/#comment-7770</guid>
		<description>&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
&lt;mx:Application xmlns:mx=&quot;http://www.adobe.com/2006/mxml&quot; 
  creationComplete=&quot;initApp();&quot;&gt;

    &lt;mx:Script&gt;
        &lt;![CDATA[
        
            import mx.events.DragEvent;
            import mx.managers.DragManager;
            import mx.core.DragSource;
            import mx.collections.IList;
            import mx.collections.ArrayCollection;
            import mx.controls.Alert;
    
            private function initApp():void {
            	
                destDG.dataProvider = new ArrayCollection([
                    {label:&quot;First&quot;, data:&quot;1&quot;},
                    {label:&quot;Second&quot;, data:&quot;2&quot;},
                    {label:&quot;Third&quot;, data:&quot;3&quot;},
                    {label:&quot;Fourth&quot;, data:&quot;4&quot;},
                ]);
            	    
                
                srcList.dataProvider = new ArrayCollection([]);
                
            }

            private function dragDropHandler(event:DragEvent):void {
              if (event.dragSource.hasFormat(&quot;items&quot;))
              {
                // Explicitly handle the dragDrop event.            
                event.preventDefault();

                // Since you are explicitly handling the dragDrop event,
                // call hideDropFeedback(event) to have the drop target
                // hide the drop indicator. 
                // The drop indicator is created
                // automatically for the list controls by the built-in 
                // event handler for the dragOver event.
                event.currentTarget.hideDropFeedback(event);

                // Get drop target.
                var dropTarget:List = 
                  List(event.currentTarget);

                var itemsArray:Array = 
                    event.dragSource.dataForFormat(&#039;items&#039;) as Array;
                var tempItem:Object = 
                    { label: itemsArray[0].Fund, 
                      data: itemsArray[0].AMC,
                      data: itemsArray[0].Risk_Rating 
                    };
    
                // Get the drop location in the destination.
                var dropLoc:int = dropTarget.calculateDropIndex(event);
       
                IList(dropTarget.dataProvider).addItemAt(tempItem, dropLoc);
              }
            }
        ]]&gt;
    &lt;/mx:Script&gt;

    &lt;mx:HBox&gt;
        &lt;mx:List  id=&quot;srcList&quot; 
            dragEnabled=&quot;true&quot;
            dropEnabled=&quot;true&quot;
            dragDrop=&quot;dragDropHandler(event);&quot;/&gt;

        &lt;mx:DataGrid  id=&quot;destDG&quot;
        	dragEnabled=&quot;true&quot; 
            dragMoveEnabled=&quot;true&quot;&gt;
            &lt;mx:columns&gt;
                &lt;mx:DataGridColumn dataField=&quot;label&quot;/&gt;
                &lt;mx:DataGridColumn dataField=&quot;data&quot;/&gt;            
                &lt;mx:DataGridColumn dataField=&quot;date&quot;/&gt;            
            &lt;/mx:columns&gt;                
        &lt;/mx:DataGrid&gt;            
        
        
        
    &lt;/mx:HBox&gt;

    &lt;mx:Button id=&quot;b1&quot; 
        label=&quot;Reset&quot;
        click=&quot;initApp()&quot;
    /&gt;




	
&lt;/mx:Application&gt;</description>
		<content:encoded><![CDATA[<p>&lt;?xml version=&#8221;1.0&#8243; encoding=&#8221;utf-8&#8243;?&gt;<br />
&lt;mx:Application xmlns:mx=&#8221;http://www.adobe.com/2006/mxml&#8221;<br />
  creationComplete=&#8221;initApp();&#8221;&gt;</p>
<p>    &lt;mx:Script&gt;<br />
        &lt;![CDATA[</p>
<p>            import mx.events.DragEvent;<br />
            import mx.managers.DragManager;<br />
            import mx.core.DragSource;<br />
            import mx.collections.IList;<br />
            import mx.collections.ArrayCollection;<br />
            import mx.controls.Alert;</p>
<p>            private function initApp():void {</p>
<p>                destDG.dataProvider = new ArrayCollection([<br />
                    {label:"First", data:"1"},<br />
                    {label:"Second", data:"2"},<br />
                    {label:"Third", data:"3"},<br />
                    {label:"Fourth", data:"4"},<br />
                ]);</p>
<p>                srcList.dataProvider = new ArrayCollection([]);</p>
<p>            }</p>
<p>            private function dragDropHandler(event:DragEvent):void {<br />
              if (event.dragSource.hasFormat(&#8220;items&#8221;))<br />
              {<br />
                // Explicitly handle the dragDrop event.<br />
                event.preventDefault();</p>
<p>                // Since you are explicitly handling the dragDrop event,<br />
                // call hideDropFeedback(event) to have the drop target<br />
                // hide the drop indicator.<br />
                // The drop indicator is created<br />
                // automatically for the list controls by the built-in<br />
                // event handler for the dragOver event.<br />
                event.currentTarget.hideDropFeedback(event);</p>
<p>                // Get drop target.<br />
                var dropTarget:List =<br />
                  List(event.currentTarget);</p>
<p>                var itemsArray:Array =<br />
                    event.dragSource.dataForFormat(&#8216;items&#8217;) as Array;<br />
                var tempItem:Object =<br />
                    { label: itemsArray[0].Fund,<br />
                      data: itemsArray[0].AMC,<br />
                      data: itemsArray[0].Risk_Rating<br />
                    };</p>
<p>                // Get the drop location in the destination.<br />
                var dropLoc:int = dropTarget.calculateDropIndex(event);</p>
<p>                IList(dropTarget.dataProvider).addItemAt(tempItem, dropLoc);<br />
              }<br />
            }<br />
        ]]&gt;<br />
    &lt;/mx:Script&gt;</p>
<p>    &lt;mx:HBox&gt;<br />
        &lt;mx:List  id=&#8221;srcList&#8221;<br />
            dragEnabled=&#8221;true&#8221;<br />
            dropEnabled=&#8221;true&#8221;<br />
            dragDrop=&#8221;dragDropHandler(event);&#8221;/&gt;</p>
<p>        &lt;mx:DataGrid  id=&#8221;destDG&#8221;<br />
        	dragEnabled=&#8221;true&#8221;<br />
            dragMoveEnabled=&#8221;true&#8221;&gt;<br />
            &lt;mx:columns&gt;<br />
                &lt;mx:DataGridColumn dataField=&#8221;label&#8221;/&gt;<br />
                &lt;mx:DataGridColumn dataField=&#8221;data&#8221;/&gt;<br />
                &lt;mx:DataGridColumn dataField=&#8221;date&#8221;/&gt;<br />
            &lt;/mx:columns&gt;<br />
        &lt;/mx:DataGrid&gt;            </p>
<p>    &lt;/mx:HBox&gt;</p>
<p>    &lt;mx:Button id=&#8221;b1&#8243;<br />
        label=&#8221;Reset&#8221;<br />
        click=&#8221;initApp()&#8221;<br />
    /&gt;</p>
<p>&lt;/mx:Application&gt;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: siddhartha</title>
		<link>http://blog.flexexamples.com/2007/09/19/dragging-rows-between-two-different-flex-datagrid-controls/comment-page-1/#comment-7769</link>
		<dc:creator>siddhartha</dc:creator>
		<pubDate>Fri, 21 May 2010 14:10:55 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/09/19/dragging-rows-between-two-different-flex-datagrid-controls/#comment-7769</guid>
		<description>Hi , here is a code that puts a datagrid value into a list , this is done pretty first time , so guys enjoy.




    
        
    

    
        

        
            
                
                            
                            
                            
                    
        
        
        
    

    




	
</description>
		<content:encoded><![CDATA[<p>Hi , here is a code that puts a datagrid value into a list , this is done pretty first time , so guys enjoy.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Reshma</title>
		<link>http://blog.flexexamples.com/2007/09/19/dragging-rows-between-two-different-flex-datagrid-controls/comment-page-1/#comment-6916</link>
		<dc:creator>Reshma</dc:creator>
		<pubDate>Wed, 03 Feb 2010 17:56:31 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/09/19/dragging-rows-between-two-different-flex-datagrid-controls/#comment-6916</guid>
		<description>Hi,

In this example, is there a way you can avoid highlighting the list border when we drag both in source list and destination list(when we drag over it)?

Thanks!</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>In this example, is there a way you can avoid highlighting the list border when we drag both in source list and destination list(when we drag over it)?</p>
<p>Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Lukas</title>
		<link>http://blog.flexexamples.com/2007/09/19/dragging-rows-between-two-different-flex-datagrid-controls/comment-page-1/#comment-6741</link>
		<dc:creator>Lukas</dc:creator>
		<pubDate>Thu, 07 Jan 2010 17:41:50 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/09/19/dragging-rows-between-two-different-flex-datagrid-controls/#comment-6741</guid>
		<description>Thanks, Guillermo! I&#039;ve been looking for this solution.</description>
		<content:encoded><![CDATA[<p>Thanks, Guillermo! I&#8217;ve been looking for this solution.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anthony</title>
		<link>http://blog.flexexamples.com/2007/09/19/dragging-rows-between-two-different-flex-datagrid-controls/comment-page-1/#comment-6702</link>
		<dc:creator>Anthony</dc:creator>
		<pubDate>Wed, 30 Dec 2009 16:24:45 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/09/19/dragging-rows-between-two-different-flex-datagrid-controls/#comment-6702</guid>
		<description>This is awesome. I combined it with resizable drag panels  and it works great so far !!!!

http://blogs.adobe.com/flexdoc/2007/03/creating_resizable_and_draggab.html</description>
		<content:encoded><![CDATA[<p>This is awesome. I combined it with resizable drag panels  and it works great so far !!!!</p>
<p><a href="http://blogs.adobe.com/flexdoc/2007/03/creating_resizable_and_draggab.html" rel="nofollow">http://blogs.adobe.com/flexdoc/2007/03/creating_resizable_and_draggab.html</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Roelof</title>
		<link>http://blog.flexexamples.com/2007/09/19/dragging-rows-between-two-different-flex-datagrid-controls/comment-page-1/#comment-6661</link>
		<dc:creator>Roelof</dc:creator>
		<pubDate>Wed, 23 Dec 2009 09:06:17 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/09/19/dragging-rows-between-two-different-flex-datagrid-controls/#comment-6661</guid>
		<description>Great example Peter! I would like to inform you that we wrote an article about &lt;a href=&quot;http://www.flex-blog.com/drag-and-drop-from-datagrid-or-advanceddatagrid-to-tree/&quot; rel=&quot;nofollow&quot;&gt;drag and drop from AdvancedDataGrid to Tree&lt;/a&gt; on our blog.

Cheers</description>
		<content:encoded><![CDATA[<p>Great example Peter! I would like to inform you that we wrote an article about <a href="http://www.flex-blog.com/drag-and-drop-from-datagrid-or-advanceddatagrid-to-tree/" rel="nofollow">drag and drop from AdvancedDataGrid to Tree</a> on our blog.</p>
<p>Cheers</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Hector Sanchez</title>
		<link>http://blog.flexexamples.com/2007/09/19/dragging-rows-between-two-different-flex-datagrid-controls/comment-page-1/#comment-6200</link>
		<dc:creator>Hector Sanchez</dc:creator>
		<pubDate>Mon, 02 Nov 2009 21:33:44 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/09/19/dragging-rows-between-two-different-flex-datagrid-controls/#comment-6200</guid>
		<description>Hi, Excellent blog

Do you know how to DISABLE the drag and drop in a one simple column of the  AdvancedDataGrid? just one not entire</description>
		<content:encoded><![CDATA[<p>Hi, Excellent blog</p>
<p>Do you know how to DISABLE the drag and drop in a one simple column of the  AdvancedDataGrid? just one not entire</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bogdan</title>
		<link>http://blog.flexexamples.com/2007/09/19/dragging-rows-between-two-different-flex-datagrid-controls/comment-page-1/#comment-6008</link>
		<dc:creator>Bogdan</dc:creator>
		<pubDate>Tue, 13 Oct 2009 08:51:43 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/09/19/dragging-rows-between-two-different-flex-datagrid-controls/#comment-6008</guid>
		<description>Naresh,
try using (event.relatedObject as List).lastDropIndex;
i had the same problem as you, and the line above seems to do the trick.</description>
		<content:encoded><![CDATA[<p>Naresh,<br />
try using (event.relatedObject as List).lastDropIndex;<br />
i had the same problem as you, and the line above seems to do the trick.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

