[CLOSED] How to sync-up paging after inserting a Store record?
Hi,
Please advise how to keep the Store paging and page size in sync after inserting one or more new records on the client. The behavior I've been observing is that the first page visible display grows indefinitely with every new record added. That is despite the total number of pages on the pager increasing correctly. Once I page forward, this discrepancy disappears. Please let me know if more info is needed.
Code:
// Invoked by a Button sitting on the GridPanel Paging Toolbar
var addRecord = function () {
var grid = this.up("gridpanel");
grid.getStore().insert(0, new MyModel({
ID: getNextID(),
CurrentDate: new Date()
}));
};
var getNextID=function(){
// return some unique number
};