>>When I seek a record in my cursor and open my grid, the grid has scrolled down so that the selected (current) record is at the top of the grid - even if it's the last record in a group of 2 or three!
>>
>>How can I scroll the grid to the top (or at least up a page) without changing the currently selected record?
>>
>>TIA
>
>As long as the grid has focus, the following works for me:
>with ThisForm
> .LockScreen = .t.
> with .Gridname
> do while .RelativeRow > 1
> .DoScroll(1)
> enddo
> endwith
> .LockScreen = .f.
>endwith
If you added a
.SetFocus()
before the Do While, would this work every time?