Hi,
I had the same error using panel grid with infine scrolling in Ext 4.1: changing pages with different grids, Ext always returned this error.
I solved it overriding two methods in Ext.grid.PagingScroller, this is the code:
Code:
Ext.override(Ext.grid.PagingScroller, {
getFirstVisibleRowIndex: function() {
var me = this,
store = me.store,
view = me.view,
scrollTop = view.el.dom.scrollTop,
rows,
count,
i,
rowBottom;
if (me.variableRowHeight) {
rows = view.getNodes();
count = store.getCount();
if(rows.length > 0){
for (i = 0; i < count; i++) {
rowBottom = Ext.fly(rows[i]).getOffsetsTo(view.el)[1] + rows[i].offsetHeight;
if (rowBottom > view.el.dom.clientHeight) {
return;
}
if (rowBottom > 0) {
return i + me.tableStart;
}
}
}
} else {
return Math.floor(scrollTop / me.rowHeight);
}
},
getLastVisibleRowIndex: function() {
var me = this,
store = me.store,
view = me.view,
clientHeight = view.el.dom.clientHeight,
rows,
count,
i,
rowTop;
if (me.variableRowHeight) {
rows = view.getNodes();
count = store.getCount();
if(rows.length > 0){
for (i = count - 1; i >= 0; i--) {
rowTop = Ext.fly(rows[i]).getOffsetsTo(view.el)[1];
if (rowTop < 0) {
return;
}
if (rowTop < clientHeight) {
return i + me.tableStart;
}
}
}
} else {
return me.getFirstVisibleRowIndex() + Math.ceil(clientHeight / me.rowHeight) + 1;
}
}
});
May it help you.