Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Grid entries disappear after refresh executes
Message
From
21/01/2003 17:52:13
Gerry Schmitz
GHS Automation Inc.
Calgary, Alberta, Canada
 
 
To
21/01/2003 11:35:29
Anthony Yates
Great Lakes Solutions, Inc.
Grand Rapids, Michigan, United States
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00743791
Message ID:
00744037
Views:
15
1) Is the Grid on a Form by itself ?
2) How is the Grid related to its "Master" ? SET RELATION ? .LinkMaster and .RelationExpr ? SET KEY ?
3) What's the Grid for ? Read-only ?

Since all the Forms in a Formset all share the same DataSessionId, that's a lot of potential for "unwanted side-effects" if some forms share the same table.

I would consider giving the Grid a Private DataSession and using SET KEY to control the records it displays.

Or, give the Grid its "own" Master (USE AGAIN) and sync its Master to the "Updated Master", when necessary

Or replace the Grid with a (related) BROWSE.

In any event, I don't think you should ever "refresh" a Grid; instead, you should use .SetFocus to update the image.

The main thing to be aware of, is that anytime a "Master" is SELECTED (vs setting focus), all the RELATIONs from the Master are "resynced"; you will lose position in the children; at EOF(), there will be "no children".

If you SEEK or LOCATE in children beyond the "key range" dictated by the "current" (related) Master record, you will also run into problems.

One must always be gentle with one's children.

>I have been struggling with this problem for a few weeks and MS support is
>bewildered.
>I have a somewhat busy formset that uses table buffering with 10 screens
>and
>10 tables.
>One of the screens contains a grid that displays details of the current
>record(child table). There is a button on the screen that allows the user to
>add records, everything goes well until a parent record is added and the
>refresh of the grid takes place. After this occurs the grid becomes blank.
>
>Once this occurs all other child entries on the grid for other records are
>gone also.
>
>Exiting the program and clearing all and running the app again does not
>remedy the situation, I have to close VFP entirely to see the grid again.
>
>I watched the recordsource for the grid and it never changes in the
>debugger.
>
>
>Very perplexed.
>
>Anthony Yates
Previous
Reply
Map
View

Click here to load this message in the networking platform