extjspaginationtoolbargridpanel

Paging toolbar refresh equivalent


This should be very simple but I don't have any solution yet. I am using a ExtJs v.3.3.1

I have a grid panel that allows record deletion. The grid has a paging toolbar that is attached to the panel store.

The deletion process sends an ajax request to the server, on success I remove the record from the Db which is used for displaying record in the grid.

My problem is that when I delete a record it sometimes shows effect immediately but sometime doesn't. that is record is deleted from DB but from grid panel it doesn't get erased immediately sometimes. but when I click refresh button it shows current state of DB that everything works fine everytime.

I have used Ext.getCmp('id-pagingtoobar').doRefresh() to show immediate effect but this doesn't works every time.

Anybody has solution for this?


Solution

  • There might be problem in order in which requests are sent. I suggest you to send these request in order using

    callback:function () {
          Ext.getCmp('id-pagingtoobar').doRefresh()
    }