Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Refresh of grid sometimes fails
Message
From
11/01/2021 12:04:28
 
 
To
08/01/2021 16:45:54
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01677764
Message ID:
01677794
Views:
51
>Hi all,
>
>I have a read-only grid that users can drag-drop new files into. The files get uploaded to a server and then a requery of the server brings down a new list of the documents (this is done because there is other meta data that is on the documents server that gets displayed).
>
>Problem: occasionally the grid refreshes and instead of showing records, it is blank. If I fire up the debugger, there are actually the correct number of records in the cursor underlying the grid. But the grid shows nothing. If I come back from the debugging tool, this seems to force a refresh of the grid and my records display.
>
>My code: the code that rebuilds the cursor first pulls down the data and inserts it into the cursor (it is a cursor, not a parameterized view as the data actually comes down from the server in xml which is converted first). When that is done, I fire a refresh of the entire page e.g. this code is in the grid:
>
>THIS.Parent.Refresh()
>
>I do this because there are a bunch of buttons associated with the grid that also need their .Refresh() fired as what's in the grid determines their enabled state.
>
>The problem is, this works about 95% of the time - a refresh of the page should refresh every object contained in the page, right? And so it seems to. I am going to insert a refresh of the grid itself just before the .Parent.Refresh() for the page to see if this helps and load that on the customer's server.
>
>But it would be nice to have something more specific - are there instances when VFP refreshes a page but somehow is "lazy" at refreshing a grid because somehow it thinks it does not need to?
>
>Thanks,
>Albert

Have you tried fiddling with the the SET REFRESH values?
although the help says it affects BROWSE but doesn't mention grid, it might still affect grids as well (I've not confirmed if it does or not however).
Previous
Reply
Map
View

Click here to load this message in the networking platform