*********** ORIGINAL MESSAGE ****************** Say I am halfway into a large DBGrid table, and the cursor is half way down the DBGrid screen. How do I determine what line is at the top row of the DBGrid ? *********************************************** First you need to determine the current row in the DBGrid (the position of the cursor). There is a ROW property of TCustomDBGrid, but unfortunatelly it is protected and I don't know how you can access it except by hacking. For example: type THackDBGrid = class(TDBGrid); ... var CurrentRow: integer; ... CurrentRow := THackDBGrid(MyDBGrid).Row;
Now you can access the record in the top row of MyDBGrid by using ofset (skiping back in the table by CurentRow number of records). If you want to keep the cursor at it's current position, you will have to use Bookmarks. Does anyone know how to read DBGrid's ROW without hacking? Zoran __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com [Non-text portions of this message have been removed] ----------------------------------------------------- Home page: http://groups.yahoo.com/group/delphi-en/ To unsubscribe: [EMAIL PROTECTED] Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/delphi-en/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/

