Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Refresh of grid sometimes fails
Message
From
11/01/2021 11:38:15
 
 
To
11/01/2021 01:27:58
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01677764
Message ID:
01677793
Views:
68
Hi Christian,

Thanks. In the framework I work in (VMP), it gives an indication that the refresh does not always work as it should. Here is the note from the framework (I can't get any comment from the developer as VMP is no longer around):

* A "real" Refresh. The native Refresh leaves
* the RelativeRow/ActiveRow intact, even though
* you might have moved the record pointer.

The rest of the code there just seems to work at repositioning the record pointer and then it does a native .Refresh().

I will keep your tip and if what I have just worked in does not work, I will work in the timer to see if that helps.

Thanks,
Albert

>I have usually problems when I have a button on a grid that deletes the current row. Even after a skip a subsequent refresh would keep the deleted row visible. When grids misbehave, I do a refresh using a timer, that would refresh the grid a few milliseconds later, and it usually works much better.
>
>Timer.Enabled = .F.
>Timer.Interval = 200
>
>To Refresh the grid:
>THISFORM.tmrRefresh.Enabled = .T.
>
>And the TIMER() method of the timer:
>
>THIS.Enabled = .F.
>THISFORM.grd.Refresh()
>THISFORM.grd.SetFocus()
>
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform