>(1) if the grid does not have the focus, get the object with the focus, and set the focus to the grid > >(2) get the grid.ActiveRow > >(3) Restore the focus of the object that had the focus, if necessary > >(4) >Get the grid's top and left with objtoClient() > >(5) calculate the offset of the activerow from the grid's top > >if( activerow == 0 ) > grid with no data >else > TopOffset = HeaderHeight + GridLineWidth + (activerow -1) * ( RowHeight + GridLineWidth ?) > > if( TopOffset + iif( inlist(ScrollBars, 1, 3), sysmetric(SYSMETRIC_HSCROLLBARHEIGHT), 0) > grid.Height ) > the active row is not visible > > else > activerowTop = grid's top (from objtoClient() ) + TopOffset > endif >endif > >Thanks, I ended up using ObjToClient() .