.getElementPropertyInt(getElement(), "offsetHeight") - 2)
+ "px");
- int last = (firstRowInViewPort + pageLength);
+ // indexes go from 1-totalRows, as rowheaders in index-mode indicate
+ int last = (firstRowInViewPort + (bodyContainer.getOffsetHeight() / tBody
+ .getRowHeight()));
if (last > totalRows) {
last = totalRows;
}
- DOM.setInnerHTML(scrollPositionElement, "<span>" + firstRowInViewPort
- + " – " + last + "..." + "</span>");
+ DOM.setInnerHTML(scrollPositionElement, "<span>"
+ + (firstRowInViewPort + 1) + " – " + last + "..."
+ + "</span>");
DOM.setStyleAttribute(scrollPositionElement, "display", "block");
}