Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to hide column in a Grid???
Message
From
05/02/2003 04:24:06
Gerry Schmitz
GHS Automation Inc.
Calgary, Alberta, Canada
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00749248
Message ID:
00749264
Views:
20
Instead of actually deleting the Column, you can set Grid1.Column1.Width = 0 and .Resizable = .F. .... this effectively "hides" the Column and makes it inaccessable.

To add column code at run time, create a column "class"; eg.
DEFINE CLASS my_col AS Column
   ADD OBJECT hdr1 AS Header
   ADD OBJECT txt1 AS TextBox WITH ...

PROC txt1.Valid
   ...
ENDDEFINE
Then add the column at run-time:
Grid1.AddObject( "my_col1", "my_col" )
Grid1.my_col1.Visible = .T.
>I am trying to hide a column in grid.
>I have tryed by making Grid1.column1.Visible = .f.
>But, it only removes the caption of Header,
>does not remove the column from grid.
>
>By other way, If I add column in grid, at run time.
>How can I associate my Code on the valid of some control under that column.
>
>
>Thanks in Advance,
>Ajay
Previous
Reply
Map
View

Click here to load this message in the networking platform