Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
DATAENVIRONMENT~
Message
From
27/12/1999 17:30:41
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00308730
Message ID:
00308979
Views:
33
>>Actually, you never have to issue a refresh, no matter where the code is called from. Changing a grid's recordsource causes it to refresh itself.
>
>Erik,
>
>Grids are weird. I have seen them get fixed by calling their refresh and also by doing a setfocus to them when they aren't showing what they should be showing. Trying a refresh doesn't cost anything and it might fix the problem.
>
>I have a class of grid that does a setfocus to itself to get it to resynch with a changed recordsource. Nothing else worked dependably and that did so I left it there.

I know what you mean. My grid class has some code that should actually cause an infinite loop, but doesn't. The AfterRowColChange method does a THIS.Refresh, and THIS.Refresh calls AfterRowCall change. I had to have all of these in there to make the grid display like it should, and it BTSOOM why it doesn't crash with an infinite loop. Watching it in the debugger, you can see it go through everything twice, and then it just jumps out.

Calling a grid's SetFocus, IME does several things that you need to do: updates the record pointer (if its switched on) and forces the grid to evaluate its column's dynamic properties. (Which is important if your grid highlights the entire current row). Doing a refresh doesn't cut it.
Erik Moore
Clientelligence
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform