Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Pick List Control Source
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00068514
Message ID:
00068525
Vues:
25
>Hi All:
>
>I'm creating a PickList Class. It will use a grid somewhat along the lines of inGrid (if you don't
>know about that, doesn't matter).
>
>My first use involves selecting a record from the child record of a one to many relationship.
>Specifically, I have a Client.dbf and an Address.dbf. A Client can have more than one address (a lot of snow
>birds who spend 6 months in the north, 3 months in Arizona and 3 months travelling with a mail forwarding
>address).
>I want the pick list to have the first and last name along with the zip code, state, address, etc as separate
>columns with indexes on each one, so that the use can select whatever index they want and incrementally search
>the source.
>
>My problem.
>
>What should I use as the source for the grid?
>How can I get all the different indexes available?
>If I use a view that combines the 2 tables together, then I have to do a REQUERY() each time I want to change
>the index (by a click at the top of the column), and that could get real slow when I have a lot of addresses.
>If I use the DBFs set up in a relationship, how do I get the index to change from the parent table (set
>relation to child) to the child table (set relation to parent), at a click().
>
>The only thing I can think of that solves most of my problems, is to duplicate the fields from the parent table
>in the child table, so that all the indexes I want are in a single table. That creates a maintenance headache
>because I can't make the last name a candidate index, so I can't use RI to automatically update the child table.
>
>Any ideas?

Bill, I think you need to create a parameterized view as RecordSource for the grid. Then you can index the view on selected column.
You can try to use some textbox search classes from UT Files section for your grid.
Do you use any framework for your app? For example, Visual Fox Extend has all functionality you need built in their PowerGrid class.

Nick
Nick Neklioudov
Universal Thread Consultant
3 times Microsoft MVP - Visual FoxPro

"I have not failed. I've just found 10,000 ways that don't work." - Thomas Edison
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform