Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Grids displaying from the top of the data
Message
 
 
À
31/07/2001 09:29:36
Jordan Pastourel
Worksafe Management Systems
Toowong, Australie
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00537716
Message ID:
00537721
Vues:
22
This message has been marked as the solution to the initial question of the thread.
Hi!

>Hi all,
>i am having a bit of an issue with a grid (what a surprise). i have made the grids control source to be a cursor to which i delete and add to as the need arises. i am having two issues:
>
>1. after deleting some data and then adding some more to the cursor, the grid displays only the last record of the table with the rest up in its scroll bar.... if you know what i mean. so all the record are being displayed, but to see any but the last one you need to hit the up on the scroll bar to see them. how can i have the grid display from the top of the cursor (i have tried "go top" on the cursor too, to no avail")
>

After go top use Grid.Refresh. Actually, after grid get focus or refresh of grid is used, grid is automatically scrolled to show current record. After removing/adding just restore the last record pointer and refresh the grid. Well, if you deleted last records, you can recalibrate scrolling by the way described in the FAQ#720

>2. after deleting and adding the scroll bar shrinks as if the records weren't being deleted and where still there. i know when you use the delete command the records aren't actually removed, but i thought that with the set deleted on that the scroll bar would size according to the undeleted records. ie. the scroll bar (the middle bit between the two arrows) can look like there are other records to be displayed by being smaller then the grid height, even when there is only one record (even if there is none actually). is there a way to get the scroll bar to acknowledge the set delete on option??
>
No. Grid supposed to work with VERY large data sources, so it works only with records that are in current visible area without looking to other records. Thus it does not evaluate the number of records that are deleted. The scrollbar position is calculated only using reccount() and recno() that are, of course, not aware about the deleted records.
You can use PACK, but beware about the grid recnstruction that happens when you pack record source of the grid. Read FAQ#8019 on how to workaround it.

HTH.
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.com
ICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs

It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform