Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Preserving grid properties
Message
 
To
20/03/2004 18:57:34
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00888244
Message ID:
00888311
Views:
20
Another trict is bind the grid to an empty cursor and then append from a an 'alias' with same structure and zap to clear.

>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?
Imagination is more important than knowledge
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform