Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Grid building with custom column names
Message
De
19/05/2005 13:19:20
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Titre:
Grid building with custom column names
Versions des environnements
Visual FoxPro:
VFP 8 SP1
Divers
Thread ID:
01015908
Message ID:
01015908
Vues:
68
Just one thing I found out today: I have a grid where column names aren't Column1, Column2 etc, but rather colItemno, colDescr and such. Then I added a column to it. After saving, it wouldn't allow me to edit it again, nor would it run.

I restored the classlib (the grid is one of six grids on two pages of a pageframe), and tried again, no luck. Then I ran one of my builders which created the code to build the grid from scratch - and started editing that code, just to add a new column where I want it, adjust the widths etc.

It started erroring out on oGrd.AddObject("colSomething","column"), under a funny error "cannot change recordsource of a browse object". After several tries, I just gave up on my custom names, and went with
oGrd.addcolumn()
with oGrd.columns[this.columncount]
and kept the rest of the code as it was. And it worked.

So, while my problem is solved (and I'll probably adjust the builder to do it like this from now on), I'd like to know whether anyone else had problems with grids with custom-named columns.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Répondre
Fil
Voir

Click here to load this message in the networking platform