[CLOSED] Treepanel drop, BeforeItemMove and request confirmation

  1. #1

    [CLOSED] Treepanel drop, BeforeItemMove and request confirmation

    Hi,

    i can't request confirmation when i drag and drop one node on an other in listener BeforeItemMove


    In this thread

    https://www.sencha.com/forum/showthr...ng-as-expected

    it seems to be a solution with

    dropHandlers.wait = true
    but for me it doesn't work.


    This is my function

    var onBeforeItemMoveTreePanelInputs = function (dragNode, oldParent, newParent, index, eOpts) {
                    eOpts.wait = true;
    
                    Ext.Msg.confirm('Richiesta di conferma', 'Trasformare l\'input selezionato in sub-input?', function (btn) {
                        if (btn == 'yes') {
                            return true;
                        } else {
                            return false;
                        }
                    });
            };

    Any idea?
    Thanks
  2. #2
    Hello @ADV!

    Sorry but for your needs what you can do is step in the drag & drop process and do it yourself.

    What I mean is, you'll have to return false on the drop operation so it is cancelled and somehow store what has been moved. Then, based on the response, complete yourself the drop operation.

    Something somehow similar has been explored here Drag and drop between two panels along with the parent folder. Basically this explores intercepting the drag drop operation to customize the behavior and gain control over the process.

    I hope this helps you make your way thru the drag & drop process!
    Fabrício Murta
    Developer & Support Expert

Similar Threads

  1. Replies: 1
    Last Post: Oct 16, 2013, 7:21 PM
  2. [CLOSED] DirectEvent: confirmation request
    By tanky65 in forum 2.x Legacy Premium Help
    Replies: 4
    Last Post: Mar 05, 2013, 7:56 PM
  3. [CLOSED] Drag and drop from treepanel to treepanel in "copy" mode
    By mattwoberts in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Jul 14, 2011, 6:45 PM
  4. TreePanel - Drag & Drop
    By jigpatel06 in forum 1.x Help
    Replies: 0
    Last Post: Oct 19, 2010, 10:31 AM
  5. Populate TreePanel from WCF Service Example Request
    By SunnySingh in forum 1.x Help
    Replies: 0
    Last Post: Mar 29, 2010, 6:19 PM

Posting Permissions