Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Grid becomes blank after a tableupdate
Message
 
 
À
05/03/2002 09:53:51
Anthony Yates
Great Lakes Solutions, Inc.
Grand Rapids, Michigan, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00628120
Message ID:
00628420
Vues:
26
Hi!

Before any changes in the record source that cause record source close or going out of scope, you require to clean up the grid's RecordSource property, otherwise grid will be reconstructed. Something like following:

Grid.RecordSource = ""
... do any changes hee
Grid.RecordSource = "MyAlias"

Just a tableupdate() could not cause this. It looks like there are some programs run that close your record source or do some critical changes. To find a place in your code that cause grid reconstruction, put Set Step On command in the BeforeRowColChange event of the grid - this event is fired before reconstruction.

You can read more about grid reconstruction in the VFP Grids Part I article.

HTH.

>The "go top" and refresh the grid did not do it.
>
>But I did come across this: It works, but the wrong data appears in the grid.
>
>
>PRB: Cursor-Based Grid Goes Blank If SQL SELECT Resets Cursor
>
>SYMPTOMS
>If a grid's RecordSource property is set to a cursor, and then the SQL SELECT command resets the cursor, the grid appears blank if the RecordSource property is not set back to itself.
>
>The following command will refresh the grid properly if a SQL SELECT is run to rebuild the cursor, but if the grid's column or header properties have been customized, these customized changes will be lost and the grid's column and header properties will change back to their default settings:
>
> THISFORM.GRID1.RECORDSOURCE=THISFORM.GRID1.RECORDSOURCE
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