Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Preserving grid properties
Message
De
20/03/2004 18:57:34
 
 
À
20/03/2004 18:23:19
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00888244
Message ID:
00888245
Vues:
23
Having done some research on that, I tried the approach suggested on FAQ #8019. I used the approach of adding a property ThisForm.lGridRefreshing. So, I set that to .T. before assigning my grid RecordSource property. I also added the proper code in the grid BeforeRowColChange() event. I put a messagebox in there just to be sure the code goes in there once I assign the property. The code never goes in there.

This is what I have in my form Init():
* Refresh the grid
ThisForm.lGridRefreshing=.T.
ThisForm.ControlFile.RecordSource='Control'
ThisForm.ControlFile.Refresh()
DOEVENTS
ThisForm.lGridRefreshing=.F.
This is what I have in my form grid BeforeRowColChange():
LPARAMETERS nColIndex

MESSAGEBOX('in')
* Used when we want to change the RecordSource of the grid and wish to preserve
* the grid properties
IF PEMStatus(ThisForm,'lGridRefreshing',5) AND ThisForm.lGridRefreshing
MESSAGEBOX('in2')

   NODEFAULT
   RETURN
ENDIF
This never go in. Any idea?
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform