1. #1
    Sencha User
    Join Date
    Aug 2012
    Posts
    5
    Vote Rating
    0
    ultigax is on a distinguished road

      0  

    Default Unanswered: Refreshing grid not working after store.sync();

    I have added successfully data to server and get json back so that I have success = true. After adding, my grid doesn't sync data (just after pressing F5 for refresh whole page). In handler for success I've put:

    var store = Ext.getStore('Workers');
    store.sync();

    I've checked and I really get store Workers but the sync is not working.

    I think that when I reload data in store, data in grid should be also reloaded.

    EDIT:

    I've tried this too:

    Ext.getCmp('workerlist').getView().refresh();

    EDIT 2:

    This worked:
    var store = Ext.getStore('Workers');
    store.load();

  2. #2
    Sencha - Support Team scottmartin's Avatar
    Join Date
    Jul 2010
    Location
    Houston, Tx
    Posts
    9,316
    Vote Rating
    486
    Answers
    704
    scottmartin has a reputation beyond repute scottmartin has a reputation beyond repute scottmartin has a reputation beyond repute scottmartin has a reputation beyond repute scottmartin has a reputation beyond repute scottmartin has a reputation beyond repute scottmartin has a reputation beyond repute scottmartin has a reputation beyond repute scottmartin has a reputation beyond repute scottmartin has a reputation beyond repute scottmartin has a reputation beyond repute

      0  

    Default

    Glad you got it working.

    Scott.

  3. #3
    Sencha User metalinspired's Avatar
    Join Date
    Apr 2012
    Posts
    98
    Vote Rating
    4
    Answers
    4
    metalinspired is on a distinguished road

      0  

    Default

    Maybe sync() didn't work because there were no changes to sync with db.
    load(), on the other hand, simply loads the store, it doesn't care about any changes made.

Thread Participants: 2

Tags for this Thread