>When opening a grid linked to a DBF with say 10 records and with e.g. record 9 current in the DBF, the grid scroll position is such that one only sees the last record (or two) in the grid. Is there a way to "center" the grid scroll position so that when the grid appears, one can see more records with the selected record more or less central in the screen! Many thanks in advance.
You can use DoScroll() to manaully scroll your grid. Its been so long so I wrote this code, so I don't remember if it works, or what it did, but take a look at it.
local lcSel, lnRecs, lnCurRec
DoDefault()
lcSel=Select()
select (This.recordsource)
lnCurRec=recno()
count to lnRecs
locate record lnCurRec
if int((This.height - This.headerheight)/This.rowheight) > lnRecs
This.DoScroll(2)
endif
select (lcSel)