Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Dynamically sorting in a grid
Message
De
09/04/2003 12:16:57
Gerry Schmitz
GHS Automation Inc.
Calgary, Alberta, Canada
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00775536
Message ID:
00775575
Vues:
15
If I want to reorder or filter a table without actually indexing, sorting or filtering the "source" table, I do a SELECT and sort the "key" fields into a cursor. I then build a relation (1:1) from that cursor into the source table and show the whole thing in a grid.

You can build the SQL statement on the fly and the run it as a macro (VFP6), via EXECSCRIPT, or COMPILE and run it (via VFP7).

>I've employed a grid class with the common method of sorting the grid
>by clicking the header. The index is assumed to be the field name.
>
>Now I need to go further for our users. Above the grid I would like to
>have maybe three or four comboboxes that users can set their own combination of a sort order. So instead of my current method that only allows sorting on "part number" OR "part description" OR "Location" we can sort on "part number" then "part description" then "Location or "part description" then "location" or "Location" then "part description" etc... I cannot see the creation of all the index combinations to cover the possible sorting combinations. Not sure how to proceed. Any tips?
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform