The firstRow( ) method can be used to preserve, and later return to, the top displayed row in the grid. Use a rowset's goto( ) method to position a rowset to a previously bookmarked row.

// After a user scrolls through a grid and clicks to change view displayed in

// form...

f.saveFirst = f.g.firstrow()

f.current = q.rowset.bookmark()

// To restore grid to same display as before

q.rowset.goto(f.savefirst) // positions grid to previously saved firstrow

q.rowset.goto(f.current) // if the previously saved current row was visible

             // before it will be visible now, so grid moves

             // current row highlight to already visible row

             // displaying data from f.current row.