Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Is there a way to control WHEN a grid updates?
Message
From
25/03/2000 23:26:52
Peter Brama
West Pointe Enterprises
Detroit, Michigan, United States
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00350331
Message ID:
00350482
Views:
20
Barbara....

Hi....

Actually, my nievity (sp) to VFP.... I have in the DE, the cursor for the TALLY table, a filter that reads...

tally.eventid=event.eventid and tally.barnum=bar.number

This seems to work. When the combo's switch the event.eventid or bar.number, the grid updates correctly
and displays the records, just not at the preferred times.


A view has been suggested for me but... a) I have never used one b) when I tried to create one, i got totally
lost c) when I created one with a ?vp_eventid... parameters, as I RAN the form a box appeared asking me
for the value for the parameters (not what I want the user to do) d) I wasn't sure HOW to get the view to
manipulate the tally table correctly as the changes are being made.


I stumpled upon the FILTER option in the DE when someone suggested I use a SET FILTER to control the
table. I am probably being to picky, for it seems to be working, just not 100% to my liking. Here is an example...

- When the form starts, the combos are blank - nothing listed (so is the grid)
- When the user picks the EVENT (no bar yet), the grid fills. It appears to be filling with data that matches
the event and the FIRST bar in the list even though it isn't displayed in the combo. I worked around that by
setting the BAR to the first record and displaying it on the init. It works, not by choice though.
- When the user picks an EVENT, if that event internal flag says it is ready to be processed, it is to go on and
continue with the processing. If not, it messageboxs a warning, clears the combo, and sets focus back to the
combo. Unfortunately, the grid is STILL populated with the old data at this time. Again, not desireable. This
also happens if the user goes and changes the event a midstream... and the changed to event is an invalid one
at this time also. The event is blank, but the grid still shows records for a previous event.

Bit confusing for me, REALLY confusing for the user who is by far not computer literate.






>Peter,
>It depends on how the grid data is setup and also on how your form and grid refresh code is designed. Are you using tables linked with "Set Relation" or tables linked through the grid LinkMaster, RelationalExpr and ChildOrder properties?
>
>If you want to control this completely, you may wish to populate the grid with a parameterized view and handle the grid refresh programmatically AFTER your combo validation is complete.
>
>HTH
>Barbara
>
>>I have a grid on a form and because it is linked to a table, when I change the "controlling"
>>combos, the grid immediately updates. In some cases, incorrectly, if by chance my error
>>catching code messagebox up a warning to the user. Is there some way to trigger, when or
>>when not the grid will display the updated "filter"'d records? The only alternative I can think of
>>is VISIBLE=.F. on the entire grid or each individual column until I WANT it to display.
>>
>>Thanks
Peter Brama
West Pointe Enterprises

VFP is getting easier but STILL alot to learn!!
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform