IIRC, the DragDrop event is the right place and you were already doing
that.  If you don't preventDefault that event, it will insert the
dragged items into the DP.  I haven't been paying close attention so I'm
not clear what problem you ran into that makes you think this isn't the
way to go.

 

________________________________

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of bredwards358
Sent: Friday, June 13, 2008 11:21 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Help me understand custom drag/drop events

 

I'm not sure I get what you're saying but it seems that if I want to
alter the default behavior to insert the new row to the database as
well as the target dataProvider as it normally does I would probably
need a custom DragManager to add that bit. Perhaps I could be phrasing
my question wrong, since all I need to know is where to start coding
it so that along with the default behavior of putting the dragged item
into the target dataProvider, it calls a function to insert it into
the database if it doesn't already exist in which case,
event.preventDefault is called in the for loop.

--- In flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com>
, "Alex Harui" <[EMAIL PROTECTED]> wrote:
>
> Event properties should be thought of as read-only. Drag/Drop events
> are dispatched by the DragManager so to alter what gets dispatched
would
> probably require a custom DragManager which isn't officially
supported.
> I suppose you could intercept and re-dispatch events using capture
> phase, stopImmediatePropagation and what not, but it seems like
> overkill.
> 
> 
> 
> Typically, you catch the event, and if you don't want default behavior
> you call preventDefault(). Since the default behavior is insert, you
> shouldn't call preventDefault if you want insert, and only if you're
> going to block the insert and modify the quantity.
> 
> 
> 
> ________________________________

 

Reply via email to