Thanks so much!!! It was the lack of event.preventDefault() that was causing the problems. Once I added that into all my handlers the drag-and-drop worked like a charm!!!
Wayne --- In [email protected], "Deepa Subramaniam" <[EMAIL PROTECTED]> wrote: > > A few things: first, you'll have to call preventDefault() on your > DragEvent object to cancel the default behavior so that only your custom > event handler runs. Second, you'll have to add a custom dragOver event > handler so that the DataGrid shows the correct feedback allowing items > to be dropped from the Tree. > > > > ________________________________ > > From: [email protected] [mailto:[EMAIL PROTECTED] On > Behalf Of wayneposner > Sent: Tuesday, December 05, 2006 9:33 AM > To: [email protected] > Subject: [flexcoders] Re: ListBase.as getting called after Drop to > Datagrid--Preventing the Drop??? > > > > Hi Lach, > > Nope...My component code looked liked: > <mx:DataGrid id="cart" dragEnabled="true" dropEnabled="true" > dragEnter="onDragEnter(event)"/> > > Still haven't figured out what caused the problem. > > Wayne > > --- In [email protected] <mailto:flexcoders%40yahoogroups.com> > , Lachlan Cotter <lach@> wrote: > > > > Hi Wayne, > > > > By any chance did you forget to register your event handler with the > > DataGrid? Just a thought. > > > > Cheers, > > Lach > > > > > > On 30/11/2006, at 1:07 AM, wayneposner wrote: > > > > > I'm trying to drag-and-drop from a tree to a datagrid. I've followed > > > the examples to try to achieve this, but whenever I drag over the > > > datagrid, it refuses to accept the drop. The datagrid acts like the > > > dropEnabled flag is set to false. I've traced the code and despite > > > the fact that I have a custom dragEnter handler, it still executes > the > > > handler found in ListBase.as which cancels out my handler. > > > > > > Does anyone know what would cause this? Thanks! > > > > > > My Handler is as follows: > > > > > > private function onDragEnter( event:DragEvent ) : void > > > { > > > DragManager.acceptDragDrop(UIComponent(event.currentTarget)); > > > } > > >

