Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to set code in the Method or Events in Runtime?
Message
De
24/08/2013 02:57:37
 
 
À
24/08/2013 00:44:09
Yim Ming Sun Derek
Spacious Design Consultant
Hong Kong, Hong Kong
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP3
Network:
Windows 2008 Server
Database:
Oracle
Application:
Desktop
Divers
Thread ID:
01581252
Message ID:
01581254
Vues:
71
>Hi,
>
>I want to set some coding in the Grid Header Click event in runtime.
>How to do it ?

I don't know if that's possible.

You could pass a parameter to a generic function. If you want to, say, order the grid by the column whose header gets clicked you can do something like this:
* Not tested, concept only

* Grid.Column.Header.Click()
=OrderSet( This.Caption )

* Function OrderSet
FUNCTION OrderSet
LPARAMETERS tcCaption

DO CASE
CASE tcCaption == "Caption1"
  SET ORDER TO TAG SomeTag1 IN SomeAlias

CASE
...

OTHERWISE
...

ENDCASE

GO RECNO( "SomeAlias" ) IN SomeAlias

* Refresh the grid

ENDFUNC
Regards. Al

"Violence is the last refuge of the incompetent." -- Isaac Asimov
"Never let your sense of morals prevent you from doing what is right." -- Isaac Asimov

Neither a despot, nor a doormat, be

Every app wants to be a database app when it grows up
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform