pvm2704
11-21-2008, 11:29 PM
Hi everybody,
I have a question that kept me busy for days. In my treeview, it is possible to move items. The Tree's dragEnabled, dropEnabled, and dragMoveEnabled are all set to true. This works perfectly fine.
Now, the default behavior of the flex Tree is that leafs can only be dragged to branches. It is not possible to drag a leaf to another leaf in order to make it a child of the target leaf.
I'd like to modify the behavior in such a way that each leaf can be a potential branch. By dragging a leaf to another leaf, the target leaf should turn into a branch and the dragged leaf should be the child of the target leaf.
I have tried many things. One of the solutions I investigated is to define each item in the tree as a branch. However, I encounter lots of problems with this solution. When a user expands a branch that does not have any leaves, he/she gets an error. An exception is also raised when the user tries to drag a child branch away from its parent.
I was wondering whether anybody here tried to do the same thing. If so, how did you solvethe problem? Any suggestions about how to approach this problem are welcome!
I have a question that kept me busy for days. In my treeview, it is possible to move items. The Tree's dragEnabled, dropEnabled, and dragMoveEnabled are all set to true. This works perfectly fine.
Now, the default behavior of the flex Tree is that leafs can only be dragged to branches. It is not possible to drag a leaf to another leaf in order to make it a child of the target leaf.
I'd like to modify the behavior in such a way that each leaf can be a potential branch. By dragging a leaf to another leaf, the target leaf should turn into a branch and the dragged leaf should be the child of the target leaf.
I have tried many things. One of the solutions I investigated is to define each item in the tree as a branch. However, I encounter lots of problems with this solution. When a user expands a branch that does not have any leaves, he/she gets an error. An exception is also raised when the user tries to drag a child branch away from its parent.
I was wondering whether anybody here tried to do the same thing. If so, how did you solvethe problem? Any suggestions about how to approach this problem are welcome!