Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Grid won't refresh
Message
From
19/10/2021 13:43:08
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Grid won't refresh
Miscellaneous
Thread ID:
01682555
Message ID:
01682555
Views:
83
Running into a weird thing in a large application. We mostly aren't using grids, but a few forms call for them. On one of these forms, I'm running into a case where I repopulate the cursor for the grid (yes, using Safe Select), but the grid itself won't visually refresh unless I click into another window and then back on this form.

The grid in question is a list of open invoices from a vendor. It has 10 columns. All except the last are read-only. In column 10, the user can enter how much of this invoice they want to pay. When the user has done that for all the ones to be paid, they click the Save button on a toolbar or press F10 to save the payment voucher.

The save code is creating and populating the right set of records. After that's done, it calls a method to collect the list of invoices paid on this voucher, so it can be displayed. As I said, this code uses Safe Select, running the query into another cursor, then ZAPping the original cursor and then APPENDing from the other cursor. This is followed by a Refresh of the grid.

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.

Even weirder, navigation in the form works fine until I save and this starts. That is, if I open the form in View mode, and move among records, the grid updates correctly. But once I've saved a record, when I navigate, the grid doesn't update unless I click off the form and back onto it.

I've actually added MOUSE commands at the end of the save to make the refresh happen, but that doesn't solve the navigation problem (and for reasons too complicated to go into, I can't easily add those MOUSE commands to, say, the form Refresh).

Any ideas what might cause this and, more importantly, how to fix it?

Tamar
Next
Reply
Map
View

Click here to load this message in the networking platform