Results 1 to 7 of 7

Thread: Grid Store snapshot

  1. #1

    Exclamation Grid Store snapshot

    I have noticed with Firebug that there is in a property named snapshot which always holds the initial unfiltered records.
    This was very helpful, because I wanted a similar attribute.
    Is this a valid property in order to get the initial records? (This property does not hold the initial records after modify or deleting).

    Any idea?

  2. #2
    Sencha Premium User mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Gainesville, FL


    You are just wanting the initial records? Or are you wanting to clear the filter?

    To clear the filter to return all records the Store has:

    If you are wanting the initial records, you can do it many way. I would prefer to extend If it is a local Store, then you can do it in initComponent function and set your own parameter. If it is a remote Store, you will have to listen for the load event and set your own parameter then remove the load listener.
    Mitchell Simoens @LikelyMitch

    Check out my GitHub:

    Posts are my own, not any current, past or future employer's.

  3. #3


    It would be preferable if it were a property on store, like in Ext.form.Fields originalValue where it would hold the initial records.
    I was wondering if it could be the snapshot property.

  4. #4
    Sencha User Condor's Avatar
    Join Date
    Mar 2007
    The Netherlands


    1. A newly created record has a 'phantom' property set to true.
    2. A modified record has a 'dirty' property set to true and a 'modified' property that holds the original field values (only of the fields that have changed).
    3. A store has a 'modified' and a 'deleted' property that hold an array of modified and deleted records.

    The original data used to load the store is also still available in the reader, so if you want to compare the current store with the original data, you could create a second store and load it with the original data from the reader.

  5. #5


    Thank you Condor,
    I was thinking of a parallel store, too.
    Moreover, do you know if the snapshot property of a store is a valid placeholder for unfiltered records?

  6. #6
    Sencha User Condor's Avatar
    Join Date
    Mar 2007
    The Netherlands


    Yes, the snapshot holds all records (both filtered and unfiltered), but it doesn't hold a copy of the records, so you can't use it to check if any of the records are modified.

  7. #7


    OK Condor,
    Thank you very much!

Similar Threads

  1. Snapshot in Store
    By harsha_velicheti in forum Ext 3.x: Help & Discussion
    Replies: 1
    Last Post: 6 Feb 2012, 8:32 AM
  2. [OPEN] [TOUCH-428] loadData does not clear / remove snapshot
    By buz in forum Sencha Touch 1.x: Bugs
    Replies: 6
    Last Post: 26 Aug 2011, 3:47 PM
  3. [2.0b1][CLOSED] misses to update snapshot
    By andrei.neculau in forum Ext 2.x: Bugs
    Replies: 6
    Last Post: 22 Sep 2009, 11:15 PM
  4. Taking snapshot
    By woss in forum Ext 2.x: Help & Discussion
    Replies: 2
    Last Post: 7 Feb 2008, 11:01 AM
  5. Store filter/snapshot reload bug
    By steven in forum Ext 1.x: Bugs
    Replies: 4
    Last Post: 18 Apr 2007, 6:52 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