1 Reply Latest reply on Aug 16, 2006 1:23 PM by arkcto

    DragAndDrop to a Tree

    arkcto
      Hi,

      I am a newbie to Flex and I have a question about drag&drop from datagrid to trees. In my application panel, on the left side, I have a datagrid and on the right side I have a tree structure. I'd like to drag items from the datagrid and drop it on a tree node. After I drop it on the node of the tree, the tree should expand accordingly. For example, the tree can be a fridge. Inside a fridge we have shelves, and in a shelf we have fruits. The item on the datagrid can be a fruit or a shelf. If I drag a fruit from the grid and drop it on a shelf on the right side, the shelf expands to accomodate one more fruit. If I drag a shelf from the datagrid and drop it on the fridge on the right side, the fridge expands to accomodate one more shelf. Some of this is just application logic, but just wanted to create a context for my question.

      Right now, when I am dragging it, the tree doesn't allow me to drop. I've set the dropEnabled attribute to true. Is there an example on the site, where a similar thing has been done before ?

      Thanks for your help.
        • 1. DragAndDrop to a Tree
          arkcto Level 1
          Also, I've been to drag and drop from within the grid and from within the tree. What I am unable to do is to drag from the grid and drop to the tree. Do I need register an event handler for communication between these components ?
          I am new to Flex :)

          Thanks.