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 16:44:19
 
 
À
10/10/2012 15:54:53
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:
01554734
Vues:
47
>>>>>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.
>>>
>>>Thank you for the response Borislav.
>>>
>>>That doesn't return the number of the record that *appears* at the top of the grid. It doesn't necesarily mean the first record on the table order, but the first one that is visible at the top of the grid. What I need is similar to grd.LeftColumn, but for rows.
>>>
>>>Thanks,
>>>
>>>Alex
>>
>>Something like this should work, not tested:
>>lnRecord = recno()
>>skip -(yourgrid.relativerow-1)
>>lnTopRecord = recno()
>>goto lnRecord
>
>I'm working what you and Bosrislav suggest, though I don;t like the idea of skipping back and forth. Probably better to select into an array all recno() ad work from the array.
>
>Thanks

You can USE the table/cursor AGAIN in another work area, and do the skipping there.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform