Your method returns the row number of the GUI grid, not the record number of the currently displayed record.
Your form has sufficient height for the DBGrid to display 10 grid rows, of which the first row is metadata (field names).
The position of the grid scroll thumb controls which dataset records are scrolled to display in the grid. The grid row number bears no relation to the record number of the data record that happens to have populated that grid row.