Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Advice
Message
From
18/02/2003 12:57:26
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Re: Advice
Miscellaneous
Thread ID:
00754393
Message ID:
00754539
Views:
19
I would much prefer to use the grid properties, but in practice I have observed annoying timing problems which require workarounds. E.g., I have one app that works fine except for one user who is a blazing touch-typist. In the Order Line Items grid, you type in a SKU and depending on what kind of item it is you get one of several modal forms to enter the detail. This guy types the SKU and hits Enter so fast that the modal form ends up BEHIND the main form, hanging the app. It's been this way since VFP 5 at least, and it isn't fixed in 8. I have to test the time between keystrokes in the KeyPress method, and eat them if they come too fast. More on your subject, in another app I have had to put a timer in the page Activate to wait a half second before Setting Focus to the Line Items grid, without which I get ALL the records in the line items table instead of just the children of the parent table's current record (for reason see below).

I have also resorted to SET FILTER in the child table to force the issue, but be aware that FILTER is not so easily optimized as it used to be. For instance, if you SET FILTER TO OptimizableCondition1 AND OptimizableCondition2 and then BROWSE, you get the obvious effect of Rushmore. If you set this filter and then base a grid on this table, I am left to conclude from the response time that Rushmore does not paticipate.

If you SET RELATION in the Form Load, you will get the record filtering, but again beware that if you SELECT the child table you will see all the records in the table, and further beware that in some cases which I can't enumerate but have seen with my own eyes and confirmed with the debugger, VFP will implicitly SELECT the child table if you click in the grid, nullifying the effect of the relation.

Your decision may also depend on how you want to handle adds and edits, whether you want to enter new data in the grid directly, etc. The official position I have heard is that grids are optimized first and foremost to work with Views. I have resisted doing it that way just because it's one more thing to mess with, but you may want to try it.
Previous
Reply
Map
View

Click here to load this message in the networking platform