You should work with the collection, though if you're really trying to remove from the original source the collection is not going to do it (because XMLLists are always copies of the source and removing something from that list is not removing from the original value). So you may want to do something like
delete mySelectedNode.parent()[mySelectedNode.childIndex()]) (there's probably a better way to do this but I'm rushing here :-)) Matt -----Original Message----- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of sourcecoderia Sent: Sunday, February 05, 2006 9:05 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Delete Item after Drag operation in Tree (Flex 2.0) Anyone know how I should be approaching this can't seem to get it right. The data provider is an XMLListCollection, and when the item is a MOVE action I need to get rid of the original item in the tree view. I was using the dragComplete event but does not seem to give the results I hoped for. Should I be working with the xml data source directly? Or the Collection, or the tree ? Does anyone have a quick sample to delete a item. Or could anyone point me in the correct direction. 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/