>I have a grid with about 11 columns that I just set the recordsource on the whole grid and let it show all columns from the alias.
>
>Now, I want to "hide" columns 8,9, and 10.
>
>When I set those columns widths to 0, I get this ugly thick line that is from the column being collapsed.
>
>How can I address this?
>
>I tried setting column.Visible=.f., but that just moves column 11 to the place of column 8, and the column 8 data still shows up.
>
>I want 1 - 7 and 11, but without hand-coding the controlsource of each column, hopefully.
Have you reorder the columns ?
On this case you cannot use columnIndex:
Grid.ColumnName.Visible = .F.
....
FOR EACH cl IN grid.columns
IF INLIST(m.cl.ColumnOrder,8,9,10)
cl.Visible = .F.
EXIT
ENDIF
NEXT