I did the following in order to not have to rely on static rowsizes:
I just added the following listener to the infinite grid example in the 4.1.1 SDK
Code:
listeners: {
viewready: function(grid) {
grid.view.el.on({
scroll: function () {
var vTop = grid.view.el.getTop()
, vBottom = grid.view.el.getBottom()
, top, bottom;
Ext.each(grid.view.getNodes(), function (node) {
if (!top && Ext.fly(node).getBottom() > vTop) {
top = grid.view.getRecord(node).index;
}
if (Ext.fly(node).getTop() < vBottom) {
bottom = grid.view.getRecord(node).index;
}
});
console.log(top + 1);
console.log(bottom + 1)
}
, buffer: 200
});
}
}