[ 
https://issues.apache.org/jira/browse/FLEX-34741?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14648111#comment-14648111
 ] 

BERTOLINO commented on FLEX-34741:
----------------------------------

Here it is, as described in the description of this issue the drag and drop is 
not functionning :

1°) no drop location indicator when dragging
2°) item always take position on the 2nd position.

<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"; 
                           xmlns:s="library://ns.adobe.com/flex/spark" 
                           xmlns:mx="library://ns.adobe.com/flex/mx" 
width="100%" height="100%" minWidth="955" minHeight="600" 
initialize="application1_initializeHandler(event)">
        <fx:Script>
                <![CDATA[
                        import mx.events.FlexEvent;
                        
                        [Bindable]
                        public var dataProvider:ArrayCollection = new 
ArrayCollection();
                        
                        protected function 
application1_initializeHandler(event:FlexEvent):void
                        {
                                for (var x:int = 1 ; x <= 10; x++)
                                {
                                        var anObj:Object = new Object();
                                        anObj["id"]=x;
                                        anObj["label"]="label "+x;
                                        dataProvider.addItem(anObj);
                                } 
                        }
                        
                ]]>
        </fx:Script>
        
        <s:DataGrid width="100%" height="100%" dataProvider="{dataProvider}" 
dragEnabled="true" dropEnabled="true" dragMoveEnabled="true">
                <s:columns>
                        <s:ArrayCollection>
                                <s:GridColumn dataField="id" editable="false" 
rendererIsEditable="false"/>
                                <s:GridColumn dataField="label" 
editable="false" rendererIsEditable="false"/>
                        </s:ArrayCollection>
                </s:columns>
        </s:DataGrid>
</s:Application>

> Spark DataGrid Drag and Drop non functioning
> --------------------------------------------
>
>                 Key: FLEX-34741
>                 URL: https://issues.apache.org/jira/browse/FLEX-34741
>             Project: Apache Flex
>          Issue Type: Bug
>          Components: Spark: DataGrid
>    Affects Versions: Apache Flex 4.14.0
>            Reporter: Devin
>              Labels: drag&drop
>
> Description
> Dropping a dragged item onto the grid does not work. When calculating the 
> DropLocation (in dragEnter, dragOver, dragDrop handlers) it falls through to 
> LayoutBase.calculateDropIndex which simply executes "return 
> target.numElements;" That's clearly not how the dropIndex should be 
> calculated on the grid. The GridLayout class should be overriding this method 
> and calculating it correctly.
> Furthermore, upon trying to fix this issue (which is more complicated than it 
> should be because DataGrid.calculateDropPosition() is marked as private) the 
> DataGrid.calculateDropPosition() does not perform a null check on the 
> DropLocation (which is valid value).
> Steps to Reproduce
> 1. Create a DataGrid with dragEnabled, dragMoveEnabled, and dropEnabled all 
> set to true.
> 2. Try dragging rows around and dropping them.
> Environment
> Windows 8, Apache Flex 4.14
> Expected Behavior
> Seeing the drop indicator.
> The expected behavior of dragging a row and dropping it in another location.
> Actual Behavior
> No drop indicator. Dropping a row does nothing.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to