Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Code that makes a column visible
Message
From
24/11/2006 12:41:17
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
 
To
23/11/2006 17:41:00
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 7 SP1
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01172161
Message ID:
01172303
Views:
19
>Hi. I have code in a method that reads someething like:
>ThisForm.pgItems.conItems.grdQuoteList.Column9.visible = .t.
>
>When I run the code, I get the message that Column9 is not found.

Depends on where, or rather when, is this code running. If it's somewhere before the grid instantiates, like form.load - could well be that the column doesn't exist YET. In that case, move the line to grid's .init(), that's late enough (all columns should have instantiated already). The code would need to be

this.column9.visible=.t.

because at that point the parent objects aren't instantiated yet - there's no container, page, pageframe.

Or, if you aren't sure what the name of the column name is, you could do this in grid.init:

this.columns[9].visible=.t.

or, if you want to make all columns visible,

this.setall("visible",.t., "column")

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Reply
Map
View

Click here to load this message in the networking platform