Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Controlling sorting in a grid.
Message
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Controlling sorting in a grid.
Divers
Thread ID:
00369438
Message ID:
00369438
Vues:
64
I have a grid set up that is showing fields from a view. I want to be able to sort the grid by clicking the header. I hate
to hard code the field name in each header click method but here is what I have come up with.

if sys(22) <> 'PARTNO' then
index on partno tag partno
else
set order to partno
endif
thisform.refresh

The next header would have 'DESCRIPTION' instead of partno.

I figured by creating the index in the click method I save processing by not creating indexes that will never
get used. Does it make sense to do it this way?
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform