>>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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only