2 Replies Latest reply on Jul 31, 2009 7:18 AM by mjpalm21

    drag and drop to a datagrid column


      I’m dragging an item from a vlist to a datagrid.  On item drop I’d like to know which column of existing datagrid I’m droping on.


      I can easily determine row I’m droping in dragDrop event: var dropLoc:int = dropTarget.calculateDropIndex(event); but how do I determine column?

        • 1. Re: drag and drop to a datagrid column
          babo_ya Level 3



          I can't think of any better way this.


          If the width of the DG is fixed.  Can you find which column based on the xmouse, ymouse when mouseUp dispatches?



          • 2. Re: drag and drop to a datagrid column
            mjpalm21 Level 1

            I guess one could make that solution work.  I guess you could look at the data grid itself and the size of each column (is that available in datagrid object?).  I guess the ymouse would be relative to the row you dripped on so you would just have to figure out the xmouse.  I wonder if you can get the x coordinate of the start of the row and then figure it out from there?


            I am pretty new to this - any experts out there want to take a crack at an example?