2 Replies Latest reply on Dec 10, 2007 8:54 AM by pigiuz

    Drop an item inside a datagrid row

    pigiuz Level 1
      Hi everybody!
      here's my app: a simple image file manager. it is made using a datagrid and a tilelist. the datagrid is populated by the "directories" (2 cols, "name" and "# items"), selecting a dir the tilelist is populated by the collection of images associated to that dir.
      Now here's my problem:
      to switch an image path the user have to drag the image from the tilelist to the datagrid. so I enabled the dragEnabled and dropEnabled properties of my tilelist and datagrid, but I have to change the target of the drop event from datagrid to datagrid row (the dir).

      I tried this way:
      on datagrid DRAG_OVER I want to locate (and trace) the datagrid item under the mouse doing this:

      var localPoint:Point = myDatagrid.localToContent(new Point(myDatagrid.contentMouseX,myDatagrid.contentMouseY));
      var objects:Array = myDatagrid.getObjectsUnderPoint(localPoint);

      but the trace of "objects" array does nothing!
      so, is there any way to trace the datagrid row under the mouse while dragging something?

      thanx in advance :D