1. #1
    Sencha User
    Join Date
    Jul 2009
    Posts
    80
    Vote Rating
    0
    dreamcaster is on a distinguished road

      0  

    Question Catching removed records in EditorGridPanel

    Hello experts,

    Would like to ask if it is possible for me to retrieve the records that was removed in the EditorGridPanel using remove() method. What I need to do is get all the changes in a certain EditorGridPanel. Using getModifiedRecords() I can get all the modified records.

    Thanks!
    Good design is more important than the underlying technology.

  2. #2
    Sencha User BitPoet's Avatar
    Join Date
    Sep 2008
    Location
    Bavaria
    Posts
    277
    Vote Rating
    1
    BitPoet is on a distinguished road

      0  

    Default

    Just hook onto the store's 'remove' event and cache them whereever appropriate, e.g.:
    Code:
    new Ext.data.Store({
      ...your store config...
      ,removedRecords: [],
      ,listeners: {
        remove: function(store, rec, idx) {
          store.removedRecords.push( rec );
        }
      }
      ,clearRemoved: function() {
        this.removedRecords = [];
      }
    });

  3. #3
    Sencha User
    Join Date
    Jul 2009
    Posts
    80
    Vote Rating
    0
    dreamcaster is on a distinguished road

      0  

    Default

    Thanks! Really a great help. :-)
    Good design is more important than the underlying technology.

Thread Participants: 1