Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
GRID - Adding Code to Header Click for code added cols
Message
De
11/10/2001 18:53:04
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
À
11/10/2001 18:07:07
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00567291
Message ID:
00567317
Vues:
15
>I have a classed grid which has 10 columns many of which are sortable, and I would like to be able to sort on some columns which are added programatically to this grid. Normally the code for this would go in the header click, but I have no way of accessing the Header Click event when these columns are added programatically. Does anyone have a workaround?

Define a header class in the .prg; in the code, after adding a new column, column.Newobject("hdr1","yourheaderclass","your.prg"). This will automatically delete your old header. You may want to column.hdr1.name="header1" if your code expects such a name. The trick is that you can't add an objet named Header1 while the old one still exists, but you can add a header with any other name.

The header class should have all the code in it, of course, but you probably have that code in the existing columns already. Just make it generic enough to be able to apply it to any column it may appear in.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform