Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Grid won't refresh
Message
From
22/10/2021 08:35:23
 
 
To
20/10/2021 15:57:45
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
01682555
Message ID:
01682587
Views:
64
>>>The result is no rows shown in the grid. (Not the empty grid you'd get without Safe Select). If I click onto _SCREEN and then back on the form, the grid fills in.
>
>IME this infuriating and time-wasting "feature" usually improves if you formally setfocus() to a control away from the grid before repopulating/refreshing it. I don't believe that a toolbar button will suffice; try thisform.btnDummy at -100,-100 whose only purpose is to receive focus. Bring focus back to the grid afterwards if needed.

A toolbar button doesn't take focus, it's designed that way. But yes, I've seen this technique several times, even a dummy textbox with negative coordinates, defined at form class level, whose only purpose is to take focus when needed. I have forgotten when it was needed (except before save, so the current control loses focus and thus forces its controlsource to get updated with its current value), but now that you mentioned it, yes, repopulating a grid would be another good time.

Proven to work - Dragan's help about 10 years ago ;)
Previous
Reply
Map
View

Click here to load this message in the networking platform