Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Grid order
Message
De
10/05/2016 11:47:58
 
 
À
10/05/2016 10:06:36
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01636103
Message ID:
01636113
Vues:
61
>Lutz - MS is quite happy to have code in the grid header click event - https://msdn.microsoft.com/en-us/library/azc9x3f9%28v=vs.80%29.aspx, so I put code in there just to see if it works, and it does, but you have to physically click it.
>
>I tried making a method called 'gridorder' and putting the 'set order to' in there, and calling that, but that didn't work either.

Even if MS is happy, it's really not a good idea. If for instance you add code in an event, and you want to call that code from some other part of your project, that event will fire. The side effects can be unpredictable. So the rule that events call methods, is a good one. But of course it's your choice. To be honest, I used to have code in events earlier, but changed my mind after some really bad experiences including hours of head scratching. :-)

To your actual problem, make sure that your "Set order to " command line contains something like "in (This.recordsource)".
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform