Drag and Drop from GridPanel to GridPanel and store.save()

  1. #1

    Drag and Drop from GridPanel to GridPanel and store.save()

    Hello good.

    I am following the example: https://examples1.ext.net/#/DragDrop...Grid_to_Grid1/

    And I have a slight problem when making the save of the store. And Have a <UpdateProxy> in both store, but this is only called when you delete, I mean in the source store, but when I add the store at destination: store.add(record) and then the store.sav () is not UpdateProxy method calls.

    (The record is drag and drop correctly)

    
         var addRow = function (store, record, ddSource) {
                // Search for duplicates
                var foundItem = store.findExact('Email', record.data.Email);
    
                // if not found
                if (foundItem == -1) {
                    //Remove Record from the source
                    ddSource.grid.store.remove(record);
                    ddSource.grid.store.save(); //Works OK
    
                    store.add(record);
                    store.save(); //Does nothing            
                }
                else {
                    Ext.Msg.show({
                        title: "Error",
                        msg: "Error",
                        buttons: Ext.Msg.OK,
                        icon: Ext.Msg.ERROR
                    });
                }
  2. #2
    Hi,

    Try this
    store.add(record);
    record.newRecord = true;
    store.save();
  3. #3
    not working

Similar Threads

  1. [CLOSED] Problem with drag and drop from gridpanel to gridpanel
    By PoloTheMonk in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Dec 16, 2011, 11:42 AM
  2. Drag-drop Gridpanel
    By johny_bravo in forum 1.x Help
    Replies: 0
    Last Post: Mar 25, 2011, 5:37 PM
  3. [CLOSED] GridPanel: Drag and Drop
    By RomualdAwessou in forum 1.x Legacy Premium Help
    Replies: 7
    Last Post: Aug 11, 2010, 12:00 PM
  4. Replies: 2
    Last Post: Jul 13, 2010, 4:30 PM
  5. GridPanel drag and drop
    By davidhoyt in forum 1.x Help
    Replies: 5
    Last Post: Oct 13, 2008, 3:40 PM

Posting Permissions