Results 1 to 2 of 2

Thread: multiSelect and delete in TreeGrid/TreePanel with TreeStore

  1. #1
    Sencha Premium Member
    Join Date
    Aug 2010
    Location
    Munich, DE
    Posts
    17

    Question multiSelect and delete in TreeGrid/TreePanel with TreeStore

    Hi everyone,

    I have a problem with erase more then one record from the treegrid. I do it with removeChild and the node are gone. But on the next, I'm trying to sync the store: store sends only one record on server to delete.


    Code:
    ...deleteRecord: function(records, store, view) {
        var node;
        if(Ext.isEmpty(store.isTreeStore)) {
            console.log('not tree store');
            store.remove(records);
        } else {
            Ext.Array.each(records, function(rec) {
                console.log(rec);
                console.log(view);
                if(rec.isRoot()) {
                    node = view.getRootNode();
                    node.removeChild(rec);
                } else {
                    node = rec.parentNode;
                    node.removeChild(rec);
                }
            });
        }
        store.sync();
    },...
    Am I doing something wrong?

  2. #2
    Sencha User
    Join Date
    Feb 2013
    Location
    California
    Posts
    11,985
    Answers
    506

    Default

    Have the child nodes been rendered before you try to delete?

Similar Threads

  1. multiselect for treegrid
    By fl.borovsky in forum Ext 5: Q&A
    Replies: 2
    Last Post: 5 Jun 2014, 4:10 AM
  2. Example of TreeStore/NestedList with add/delete?
    By Kevin Mitchell in forum Sencha Touch 2.x: Q&A
    Replies: 2
    Last Post: 6 Aug 2012, 10:56 AM
  3. Replies: 4
    Last Post: 31 Oct 2011, 4:35 PM
  4. Datagrid Multiselect, delete multiple rows
    By sassouki in forum Ext: Q&A
    Replies: 0
    Last Post: 16 Aug 2011, 2:50 AM
  5. Datagrid Multiselect, delete multiple rows
    By sassouki in forum Ext: Discussion
    Replies: 3
    Last Post: 15 Aug 2011, 11:34 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •