Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
My Grid has no order though one is defined
Message
De
07/06/2007 10:36:08
 
 
À
07/06/2007 10:33:14
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 7 SP1
OS:
Windows XP SP2
Database:
Visual FoxPro
Divers
Thread ID:
01230866
Message ID:
01231292
Vues:
17
>>>>>>Trouble is, the District list is in the correct DESC order but the Zones table is higgledy-piggledy order.
>>>>>>
>>>>>>Any ideas what's amiss?
>>>>>
>>>>>"DESC" as descending or description?
>>>>>
>>>>>And I'm not quite sure what do you mean by master-child here... do you mean the grids' recordsources are zones and districts respectively, and you got the county related into each (additive)? And if so, related via what field?
>>>>
>>>>Thank you (the only one who's answered)
>>>>
>>>>As I said, the DESC (Description) field of each table (not my table design)
>>>>
>>>>Belay what I said aboutn reversing the master [parent] - child order. I though I had but hadn't.
>>>>
>>>>Grid 1 has:
>>>>- recordsource = ZONES
>>>>- LinkMaster = COUNTY
>>>>- ChildOrder = County (FK to COUNTY.Code - PK)
>>>>- RelationalExpre = Code
>>>>and if we look at the reln. arc's props in the DE:
>>>>- ChildAlias = ZONE
>>>>- ChildOrder = County
>>>>- ParentAlias = COUNTY
>>>>- RelationalExpre = Code
>>>>
>>>>Grid 2 has:
>>>>- recordsource = DISTRICT
>>>>- LinkMaster = COUNTY
>>>>- ChildOrder = County (FK to COUNTY.Code - PK)
>>>>- RelationalExpre = Code
>>>>and if we look at the reln. arc's props in the DE:
>>>>- ChildAlias = DISTRICT
>>>>- ChildOrder = County
>>>>- ParentAlias = COUNTY
>>>>- RelationalExpre = Code
>>>>
>>>>So they both have similar key names and same relnship with COUNTY table. I have them both ordered on their DESC fields, so the descs appear in the grid in alphbetical order. Now this works (or seems to - maybe just luck) for the DISTRICT table but the ZONES table appears in random order, but the underlying table in the DE shows them to be in County (FK) order.
>>>>
>>>>Now I realise this is the ChildOrder, but when I set the Order prop, in the DE, to DESC I assumed the table would display in that order but I find the County FK is overriding.
>>>>
>>>>Maybe I'll have to make a composite key of County+Desc, but that won't have a matching parent index in the COUNTY table./
>>>>
>>>>IOW I want to display all the ZONEs for a particular COUNTY, but I want those zones in the grid, in their DESCription field order. I think it IS just luck that the DISTRICT table is in the right order.
>>>
>By using separate cursors for each grid (no relation,linkmaster etc) you can show data in any order and allow user to re-sort it interactively, etc.

Aye, thanks Ed. It happens that I did this form some 3-4 years ago when I wasn't so knowledgeable of VFP, and now, as I revisit stuff to user doc. it I'm discovering all these wee "nonkies" that I ignored/let slip/didn't notice before :-)
- Whoever said that women are the weaker sex never tried to wrest the bedclothes off one in the middle of the night
- Worry is the interest you pay, in advance, for a loan that you may never need to take out.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform