Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Need grid help
Message
 
To
29/05/1997 12:40:46
Sonny Chouinard
CHCA Computer Systems Inc.
Lachenaie, Quebec, Canada
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Title:
Miscellaneous
Thread ID:
00034068
Message ID:
00034087
Views:
35
>>I'm making a custom grid, and I am changing the controlsources of each column at runtime. However whenever I run the grid, all rows reflect the values of the same record. What am I doing wrong? Here is a piece of the code from grid.init:
>>
>>=afields(flds)
>>this.columncount = alen(flds,1)
>>for x = 1 to this.columncount
>> this.columns[x].controlsource = this.recordsource+'.'+flds[x,1]
>> temp=dbgetprop(this.columns[x].controlsource,'field','caption')
>> this.columns[x].header1.caption = ;
>> iif(isblank(temp),proper(substr(this.columns[x].controlsource,rat('.',this.columns[x].controlsource)+1)),temp)
>>endfor
>>release flds
>>
>>any help appreciated
>>
>>Mike
>
>What is the sparse and bound property of each columns ?


Both are .T. just like a normal grid. Also I realize there is a better way to set up the headers, and I've changed it to:

this.columns[x].header1.caption = iif(isblank(temp),proper(flds[x,1]),temp)

the header part still works fine but no change to the contents of the grid


Mike
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform