Alex,
reccount() will tell you how many rows are needed total (or select count(*) if you have deleted rows)
The number of available rows on the grid can be calculated based on grid.height - grid.HeaderHeight - N * ( grid.RowHeight + grid.GridLineWidth ) and conditionally minus sysmetric( 15 ) if there is a horizontal scroll bar. There's also another few pixels of height lost to other pieces of the grid that you need to account for.
>In order to choose the best row of a grid in which to show the active record, you need to know how many rows fit in the grid as well as the total number of rows (visible and out of sight) but I don't find any properties that give this directly. Does somebody know how to calculate them?