Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Grid building with custom column names
Message
From
19/05/2005 13:19:20
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Title:
Grid building with custom column names
Environment versions
Visual FoxPro:
VFP 8 SP1
Miscellaneous
Thread ID:
01015908
Message ID:
01015908
Views:
67
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.
Reply
Map
View

Click here to load this message in the networking platform