Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Datasession
Message
De
04/06/1997 20:30:51
 
 
À
04/06/1997 16:25:19
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Divers
Thread ID:
00035067
Message ID:
00035105
Vues:
44
>>>Yes, 'in run-time' means in code.
>>>Thisform.Grid.RecordSource=newalias && I assume you use RecordSourceType=1
>>>Thisform.Grid.Refresh
>>
>>Still not happening for some reason, the orig dbf is still showing up.
>>Does the code get put in the activate cell area?
>
>Put this code into some button click event and test it from there.

One thing that seems to give the grid the appropriate "push" is to reset the columns - like this:

WITH Thisform.grdMyGrid
.ColumnCount = 0 && destroy all old columns
.ColumnCount = -1 && grid automatically allocates columns
.RecordSource = "MyNewAlias" && assign new alias
.Refresh() && redraw grid
ENDWITH

If the grid has a lot of columns, you might want to wrap this in a .LockScreen, but it's not usually necessary.
David M. Stowell
Ravenslake Consulting
Chicago, Illinois

e-mail: davidstowell@ravenslakeconsulting.com
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform