I solved this another way by using lazy loading and altering "totalRecords" for each batch returned. I also passed another parameter, being my last index.
My issue is that I have results that take too long to establish how many there are, eg.I have a list of stock, I only need to list the shortages, but to go through lets say 10,000 to establish the shortages can take 5 minutes (not ideal), so I just return the number of stock as totalRecords and alter it as I know more results.
SUGGESTION: On lazy loading, the scroll bar should signify the gap afterwards as well. There should also be a timeout before the next page is loaded as if someone wants to jump to the last row, all rows between would be loaded, instead of being left blank.