Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Need grid help
Message
 
À
29/05/1997 12:40:46
Sonny Chouinard
CHCA Computer Systems Inc.
Lachenaie, Québec, Canada
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Titre:
Divers
Thread ID:
00034068
Message ID:
00034087
Vues:
37
>>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform