Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Preserving grid properties
Message
From
20/03/2004 18:57:34
 
 
To
20/03/2004 18:23:19
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00888244
Message ID:
00888245
Views:
21
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform