Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Put code in grid's column class
Message
 
 
To
12/04/2002 06:08:21
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00642989
Message ID:
00644151
Views:
20
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform