This content has been marked as final. Show 11 replies
hum, maybe try to add dragComplete="true"
I can manipulate the xml structure just fine whether it's the XMLList object, just an XMLObject, or an XMLListCollection. The problem is the the datagrid sometimes does not want to move the selected item, removes a dragged item, duplicates the dragged item, and then sometimes it moves the item just fine!
example < http://www.cgfolio.com/dragExample/DragDrop.html>
Please, share some code.
You can see the code by going to the url and right clicking anywhere on the stage and then going to "View Source"
I think this bug may have been introduced recently, as in within the last year or so. I have been running into the same problem no matter what type of data provider I use. I thought I was going mad so I searched for some examples and came across this:
URL For project discussion
URL for actual demo (right-click to view source)
If you run the demo you can see that the move works just fine (it was posted in August of 2006). However, if you download the source and compile it with Flex Builder 2.0.1 it will duplicate items you try to move on the right-side and the row highlighting gets messed up.
So this is definitely a bug. I tried dragComplete="true" but that didn't help.
Perhaps someone can modify the example above and make it work with FB 2.01? I have been trying all day with no success.
Can you try the same code with mx:List component?
That will help to identify do we have a problem here related to mx:DataGrid component or there is conceptual problem with a way we handle the underlying data.
Wow, huych02, looks like there is definitely a change in the behavior in a Datagrid from Flex 2.0.1 SDK that has some problems with drag and drop support.
Had you applied to you Flex 2.01 Hotfix 1
or Flex 2.0.1 Hotfix2 ?
Hotfix 2 update link is currently broken at Adobe web-site for some reason, I will try to figure it out why is it so...
Excellent! The hotfix worked and the datagrid drag and drop functionality works perfectly! Thanks for all of the help guys!
Well, Michael at ThanksMister responded to my email and came up with a solution for Flex 2.0.1.
Basically, when you define custom drag/drop handlers the event contains a reference to the original instead of a new copy. It does not remove the original copy during a "move" operation so you have to remove it yourself inside your event handler.
I have not installed any HotFixes. I guess I will try that and see if I can use the original code.