Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Grid Refresh
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00683122
Message ID:
00694609
Views:
26
Jim Booth had a great reply on this topic in the last few days. His
response went into more details as to why it is happening. There are
two solutions to this issues beyond what has been stated:

1.) Use a paramterized view instead of a cursor.

2.) Set all the properties of the grid by calling a method to reset
everything.

Hope this helps...

>>Let's say you initially create a cursor and set it as the recordsource
>>of the grid. Once you run a query to repopulate the new cursor you
>>have temporarily lost control of the cursor and it can bring back
>>any type of structure. By setting it to "" between queries VFP takes
>>no action and then when the cursor is reset with the same structure all
>>is well. At least that sounds good to me and is close to what is happening.
>>
>>>That worked like a charm...but why do you have to set the recordsource to "" in order to make it work?
>>>
>>>>Use a view and requery or do the following:
>>>>
>>>>grid.recordsource = ""
>>>>*-- run query
>>>>SELECT statement into cursor xx
>>>>grid.recordsource ="xx"
>
>Tom,
>I am having the same problem. My SELECT returns the right information and displays it properly. However, all settings of the grid (Header Name, Columnd widths, colors, etc.) are reset to some default values when the grid refreshes.
>
>Any ideas would be appreciated,
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform