Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Is there a way to control WHEN a grid updates?
Message
 
To
31/03/2000 13:38:07
Peter Brama
West Pointe Enterprises
Detroit, Michigan, United States
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00350331
Message ID:
00353795
Views:
19
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

>Barbara...
>
>I found it!!!! The problem with the "NAME" error was I guess a typographical error - that worked part time?!?!
>
>In my EVENT combo, the RECORDSOURCE was set as follows:
>DTOS(event.date)+name,eventid
>
>When the combo was used the first time, the records were displayed beautifully in the combo. When I went
>BACK to the combo, I received the error. At first I thought the problem was the field names using reserved words as we discussed. I changed those and
>got the same errors. I then added the table name BEFORE the "name" in the above example and that
>worked. Isn't it wierd it worked the first time without an error?
>
>
>I do have a question in reference to the TABLEUPDATE and GETFLDSTATE you referred to. Because the
>changes are being made in the VIEW records... I assume I need to check for the GETFLDSTATE in the
>AFTERROWCOLCHANGE method??? A) is there a better way to watch for changes in the displayed records
>in the grid? B) if I use the AFTERROWCOLCHANGE, is it detrimental to do the TABLEUPDATE always or
>should I still check? C) the records need to be normally updated when the EVENT or BAR is changed or the
>FORM closed. Could I just do the TABLEUPDATE then in the COMBOS or FORM CLOSE routines without
>bothering with the GETFLDSTATE.
>
>I should point out, that for each EVENT/BAR combination, there will be no more than 30-40 records in the grid
>at any one time.
>
>Thanks a million
>
>Pete
>
>p.s. Do I have to do anything special with the TABLEUPDATE to get it to update the TALLY table. I have set
>the update info in the view as directed, that should be it correct?
>
Barbara Paltiel, Paltiel Inc.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform