If the grid is hidden when data is loaded, to fix I added the following:
getHeightR: function(ri, rows) {
if(typeof(ri)==="undefined") return 0;
...
getHeightCell: function(ri, rows) {
if(typeof(ri)==="undefined" || ri<0) return 0;
In the case above, I opened the grid, scrolled down a lot, closed the grid, new data was loaded and it went wrong trying to show it.
The pqGrid code has been written assuming that the grid is visible when data is loaded or a refresh is called. This is obviously not always the case as sometimes the grid is prepared in the background for a better user experience.