29 Nov 2010 4:10 AM #1
DND cancel drop
I need to code such basic feature: user drags a node in TreeGrid, when it's dropped, user is asked via dialog window to confirm the operation or to reject it.
I can't find any way to cancel the drop the event, so the node is placed back in its original node. Can you guys help me with this issue?
29 Nov 2010 1:23 PM #2
The basic issue you face is that the dialog shows up as a result of the beforedrop or drop event, and once the dialog is (asynchronously) displayed and used, it can no longer go back and cancel the now-dead event.
Instead, you must change your approach - either allow the move, and upon reject, move it back to its old position, or cancel the move during the beforedrop, show the dialog, and if approved, go ahead and complete the move. I would chose the latter, saving state from the beforedrop event to continue the move that has been requested.
3 Dec 2010 1:53 AM #3
Thanks for the detailed reponse, I will give it a try.
By MaxT in forum Ext 1.x: Help & DiscussionReplies: 1Last Post: 1 Nov 2011, 12:34 AM
By oxyrox in forum Ext GWT: DiscussionReplies: 2Last Post: 11 Oct 2010, 1:07 PM
By gr_great_2000 in forum Ext 3.x: Help & DiscussionReplies: 9Last Post: 1 Oct 2010, 5:47 AM
By fother in forum Ext GWT: Help & Discussion (1.x)Replies: 5Last Post: 3 Jun 2009, 5:55 AM
By red900 in forum Ext 2.x: Help & DiscussionReplies: 1Last Post: 10 Sep 2008, 11:56 AM