Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Force grid refresh from SQL Stmt RowSource
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Vista
Network:
Windows 2000 Server
Database:
Visual FoxPro
Divers
Thread ID:
01350241
Message ID:
01350248
Vues:
33
This message has been marked as the solution to the initial question of the thread.
>Here is what I did:
>
>Button that updates data and redisplays the grid:
> - Replace stmts on fields needing modified
> - ran SQL Stmt (same one in RowSource for grid)
> - called thisform.grid1.init (intending to call the commands that reset the fore/back-ground colors based on new data)
>
>All I get though is a blank grid - not even gridlines.
>
>Is there a quick solution without changing to an updateable cursor, etc?

Two solutions.

First, which I don't like

myGrid.RecordSource =""
myQuery
myGrid.RecordSource = query

Another solution is to use Safe Select approach. This solution I used in my forms.

See it described at http://weblogs.foxite.com/andykramek/archive/2005/03/19/174.aspx

In our projects we used yet another approach of saving and restoring the grid. I don't have this code here right now (we incorporated these methods into our grid class).
If it's not broken, fix it until it is.


My Blog
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform