Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
No in Grid
Message
From
03/07/2001 10:36:07
 
 
To
02/07/2001 22:19:53
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Miscellaneous
Thread ID:
00526129
Message ID:
00526277
Views:
16
I presume you want to know the number of the current displayed row and the number of rows displayed in the grid at any one time.

The number of the displayed row is easy. The RelativeRow grid property returns the relative position of the active row in the grid display. If the active row is the top displayed row, the RelativeRow will be 1. If it is the third row from the top, the RelativeRow will be 3.

Getting the number of displayed rows is less straightforward. You will have to figure it out using something like the following process:
WITH oGrid
    nDisplayedRows = ROUND(( .Height - .HeaderHeight ) / .RowHeight, 0 )
ENDWITH
or, if you want to include only full rows, excluding any displayed partial row at the bottom of the grid,
WITH oGrid
    nDisplayedRows = INT( (( .Height - .HeaderHeight ) / .RowHeight )
ENDWITH
or, if you want to include any partial row at the bottom of the grid in your count,
WITH oGrid
    lnNetHeight    = .Height - .HeaderHeight
    nDisplayedRows = INT( (( lnNetHeight ) / .RowHeight ) + ;
                     IIF( MOD( lnNegHeight, .RowHeight ) > 0, 1, 0 )
ENDWITH
Regards,
Jim Edgar
Jurix Data Corporation
jmedgar@yahoo.com

No trees were destroyed in sending this message. However, a large number of electrons were diverted from their ordinary activities and terribly inconvenienced.
Previous
Reply
Map
View

Click here to load this message in the networking platform