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