There is a working example of drag drop within the same tree in the archives. Search on the subject "Drag and Drop in Tree Componet" (yes, sp)
Tracy -----Original Message----- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Robs Sent: Thursday, March 02, 2006 4:03 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Drag & drop within a tree control itself Hi people, I've a tree control which is the drag source & drop target itself to enable shuffling of nodes within the tree. As such, the normal drag & drop codes work fine but there is 1 problem in the dragComplete event. I've used the following function within dragComplete event: function doDragComplete(event) { var dragItems = event.dragSource.dataForFormat ("source").selectedItems; //var dragItems = event.dragSource.dataForFormat ("source").selectedNode; //mx.controls.Alert.show(event.dragSource, "Drag source"); mx.controls.Alert.show(dragItems[0].getProperty ("label"), "Drag Complete"); /* var counter = dragItems.length; for (var i=0;i<counter;i++) { var item = dragItems[i]; item.removeTreeNode(); }*/ } As u can see above the alert popup shud show the selected node, but its blank. The main purpose is to relocate the dragged node from the old to the new location. Kindly help... Thanks. -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/