Hi Vlad,
Thanks a lot for the information, now I can prevent the grid from reconstructing and the layout is just exactly what I want.
I wish I'm not asking too much but I still have problem now :\
After using the new method, the grid can only show the first record of the table, not only this, if the table has 10 records, the grid would also have 10 rows each showing the first record of the table.
my code to trigger the Grid update is:
TempDBF="C:\TEMP\TEMP.DBF"
thisform.GridRefreshing = .T.
close tables
copy file "&SourceDBF" to "&TempDBF"
use &TempDBF
with thisform.MyGrid
.RecordSource = "&TempDBF"
.column1.controlsource="Field1"
.column2.controlsource="Field3"
.column3.controlsource="Field5"
.column4.controlsource="Field7"
endwith
thisform.Refresh
DOEVENTS
thisform.GridRefreshing = .F.
At design time, the init value of RecordSourceType of the grid is "table", RecordSource is "TEMP". Also for each column I have set the init value of controlSource as above.
Thanks a lot for your attention and any help would be greatly appreciated!
Jimi
error(503): file structure failure, signature file corrupted.