Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Grid control cannot be used in FoxPro
Message
 
À
28/12/1997 06:57:10
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00068131
Message ID:
00068277
Vues:
32
>When this form runs, the grid will appear extremely slowly. It seems that
>FoxPro will not use index in grid refresh: it scans the whole table. Also,
>when user presses up/down arrow in first/last row, this scanning begins again.
>Therefore, FoxPro cannot be used for data editing in a table.
>Maybe this can be resolved using local views, but this requires using a database, but my table is for compatibility reasons free table?
>Maybe the following trick helps: adding a dummy non-visible master grid to form and making dummy parent-child relationship. However, child grid order cannot be controlled if this is used?

Andrus,

Three ways to speed this up,

1) SELECT Document
SET ORDER TO DocType
SET KEY TO "A","A"

or

2) SELECT * FROM Document WHERE DocType = "A" INTO CURSOR MyDocs

and set your grid's recordsource to be the cursor MyDocs

3) create a parameterized view of documents like this;

CREATE VIEW MyDocs AS SELECT * FROM Documents WHERE DocType = ?cDocType

then in any code where you want to update the grid you can;

cDodType = Whatever
Requery("MyDocs")
THISFORM.Gird.Refresh()
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform