>Another Grid Problem,
>Grid.Init Event
>
>This.recordsource='mytable1'
>This.ColumnCount=3
>
>Grid.Refresh
>This.RecordSource=This.RecordSource
>
>LOCAL lcCol
>THIS.column1.Width=40
>FOR i=2 TO This.ColumnCount
>lcCol="This.Column"+ALLT(STR(i))
>&lcCol.Width=100
>ENDFOR
>
>Grid1.ProgrammaticChange
>Parameter cSelect
>Do Case
>Case cSelect=1
>Select * From myTable1 Into myTempCursor
>Case cSelect=2
>Select * From myTable2 Into myTempCursor
>Endcase
>DO vfpxtab WITH 'mytable'
>This.Refresh()
>
>And Last Column of this grid changed it's width to 75 even though I put Column Width on grid.refresh()
>When I trace it, no problem with the code.
>Can someone help me?
>
>TIA
Grid.Refresh is not the best place for this operation, because it can fire internally sometimes. I think that separate custom method e.g. Thisform.RestoreGrid would work safer. Also, I don't quite understand: seemingly you run cross-tab query and at the same time you have columncount=3 (or you reset it on fly?).
Edward Pikman
Independent Consultant