Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Is there a way to control WHEN a grid updates?
Message
From
12/04/2000 22:48:39
Peter Brama
West Pointe Enterprises
Detroit, Michigan, United States
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00350331
Message ID:
00359092
Views:
19
Hi Barbara....

I am having a bit of a problem with the GETFLDSTATE you recommended.

Here is my code in the BEFOREROWCOLCHANGE for my GRID...


if GetFldState("qtystart")=0 or GetFldState("qtyend")=0
tableupdate(.T.)
endif


The grid is set for vEventBar as the view name and the fields that take changes are QTYSTART and
QTYEND.

When I make changes to the data in either column of the grid, this never seems to fire for when I change the
view or exit, I get an error about the buffer for vEventBar. I did some more checking, and the GetFldState never
changes from a 1 UNTIL I exit the grid, then I get a 2. I placed a MESSAGEBOX before the GETFLDSTATE to
make sure this was firing, and it is after every row or col change. Am I missing something?

Thanks




>Glad it's working, Pete. Now that I see the whole command, I think the problem was that the combo saw "Dtos(Event.date)" as a separate call from the Event.name and event.eventid fields. But I'd have to have the code to look at to see why it worked the first time. Not important now.... Now for your next questions :-)
>
>1. You can check GetFldState() at any time. It looks at the buffered view/cursor/table.
>
>2. GetFldState() checks the ACTIVE record, so you should check in the BeforeRowColChange to see if the record needs saving before you move to the next row.
>
>3. You'll have to look at your app and balance the time spent with the GetFldState() call against the time saved by NOT having to do a TableUpdate every time. It's a judgment call. Probably won't make any difference to the user in a small VFP table based system. This is true everywhere you may have changed a record - grid, combos, etc.
>
>HTH
>Barbara
>
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