Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Grids 101 - why am I so lost ?
Message
De
14/12/2006 11:22:18
 
 
À
14/12/2006 11:10:28
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Divers
Thread ID:
01177450
Message ID:
01177628
Vues:
38
>>But part of me says "hey, you are so close - do not give up!". If I could just figure out what VFP's grids are doing "under the hood" I know I could lick this...
>>
>>It's funny too: over the 20+ years I have been programming in Fox, when I look for rapid application development tools, I always ask the vendor "can your tool design a typical invoice form with a scrolling grid for entering line item details?" The answer always seems to boil down to NO, or "not exactly". I am hoping one of the frameworks has finally accomplished this :)
>
>The inhouse framework on my last job did that perfectly - but it didn't use combos at all. The trick was in the validation. In the item nr column's validation routine (which was NOT in the .column.valid nor .column.text.valid - it was in the bizobject, which was in a .prg somewhere), I'd do a few SQL selects against the items table - trying to match the .value passed against the item codes (by = first, then by $), then against the item names. Generally, if it returns one record, use that; if it returns none, try next. If it returns multiple, pop up a little form with just a grid, where the user selects a record or not. If not, validation returns .f., and that's it.
>
>The reasoning behind this is that combos are a bit unwieldy for the end user. They may be fine for a slow selection among a few dozen items, but for a fast selection from thousands of items, they amount to no good. Also, in the long run, combo's incremental search isn't good enough - there are entries that you can't find alphabetically (because some moron typed the name with quotation marks, or prefixed it with a (few) space(s), dash or just mistyped it) etc etc.
>
>I've had combos in grids once, probably back in VFP5 and VFP6, and they worked, but weren't easy to handle. There was always one more thing to do to make them work. And, BTW, check the .sparse property for the combo's column. In one case, it means "use the specified nonstandard control for current row only", and in the other "for all rows". I still don't know exactly which is fot .t. and which for .f. - I just flip it when I don't like it :).

Column.sparse=.f.
It means that column is customized in any way, not only .dynamiccurrentcontrol but also any kinds of .inputmask, .format, .century etc.
Edward Pikman
Independent Consultant
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform