Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Put code in grid's column class
Message
 
À
12/04/2002 06:08:21
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00642989
Message ID:
00644151
Vues:
21
Hi Budianto,

You sould put the Define Class code in any .PRG file. Then instead of using the default columns as you do :

with thisform.grid1
.column1.controlsource='tmpfile->field'
.column1.header1.caption='MATERIAL NAME'
.column1.header1.forecolor=rgb(255,255,255)
.column1.header1.backcolor=rgb(97,105,156)
.column1.width=340
....
endwith

Do the following...

with thisform.grid1
.ColumnCount = 0
* do the following for each of your columns
.AddObject("MyColumnName","MyColumn")
.column1.controlsource='tmpfile->field'
.MyColumnName.header1.caption='MATERIAL NAME'
.MyColumnName.header1.forecolor=rgb(255,255,255)
.MyColumnName.header1.backcolor=rgb(97,105,156)
.MyColumnName.width=340
....

endwith

Hope it helps
********************************************

Benoit Grenier


encoder@silogic.ca (Job)
encoder@sympatico.ca (home)
Web site : www.silogic.ca
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform