Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to find which record shows first in a grid
Message
De
10/10/2012 13:07:08
 
 
À
10/10/2012 13:02:46
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP1
Divers
Thread ID:
01554683
Message ID:
01554689
Vues:
54
Both your methods find the first recno() in the table depending on the current index order, but it's not what Alejandro asked for....! He wants the recno() of the top visible record in the grid.

>>>>Is there a way to find which record shows in the first row of a grid? RECNO() would be fine.
>>>>
>>>>TIA,
>>>>
>>>>Alex
>>>
>>>It depends of the current ORDER.
>>>Maybe the MIN() value of the order KEY?
>>>or even:
>>>
>>>SELECT GridRecordSource
>>>GO TOP
>>>lnTOPRecNo = RECNO()
>>>
>>>
>>>but you should change it everywhere you change the current order of that table.
>>
>>In that case,
>>
>>select 0
>>use dbf("gridrecordsource") again alias src2
>>* do something to set order the same as in the grid
>>go top
>>lnTopRecNo=recno()
>>use
>>
>
>
>*** there where you change the ORDER:
>SELET gridrecordsource
>lnCurrentRecNo = RECNO()
>SET ORDER TO ....
>GO TOP
>lnTopRecNo=recno()
>GO lnCurrentRecNo
>
>
>Don't know which is faster :-)
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform