1. #1
    Sencha User
    Join Date
    Oct 2010
    Posts
    37
    Vote Rating
    0
    meliniak is on a distinguished road

      0  

    Default DND cancel drop

    DND cancel drop


    Hi there,

    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?

  2. #2
    Sencha - GXT Dev Team
    Join Date
    Feb 2009
    Location
    Minnesota
    Posts
    2,732
    Vote Rating
    90
    Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light

      0  

    Default


    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. #3
    Sencha User
    Join Date
    Oct 2010
    Posts
    37
    Vote Rating
    0
    meliniak is on a distinguished road

      0  

    Default


    Thanks for the detailed reponse, I will give it a try.

Similar Threads

  1. Cancel drop event in tree
    By MaxT in forum Ext 1.x: Help & Discussion
    Replies: 1
    Last Post: 1 Nov 2011, 12:34 AM
  2. DND-Validation to cancel dragDrop event
    By oxyrox in forum Ext GWT: Discussion
    Replies: 2
    Last Post: 11 Oct 2010, 1:07 PM
  3. How to cancel a drop after an Ajax failure
    By gr_great_2000 in forum Ext 3.x: Help & Discussion
    Replies: 9
    Last Post: 1 Oct 2010, 5:47 AM
  4. cancel drop event
    By fother in forum Ext GWT: Help & Discussion (1.x)
    Replies: 5
    Last Post: 3 Jun 2009, 5:55 AM
  5. How to cancel a drag drop of panel
    By red900 in forum Ext 2.x: Help & Discussion
    Replies: 1
    Last Post: 10 Sep 2008, 11:56 AM

Thread Participants: 1

Tags for this Thread