Another trict is bind the grid to an empty cursor and then append from a an 'alias' with same structure and zap to clear.
>Having done some research on that, I tried the approach suggested on FAQ #8019. I used the approach of adding a property ThisForm.lGridRefreshing. So, I set that to .T. before assigning my grid RecordSource property. I also added the proper code in the grid BeforeRowColChange() event. I put a messagebox in there just to be sure the code goes in there once I assign the property. The code never goes in there.
>
>This is what I have in my form Init():
>
>
>* Refresh the grid
>ThisForm.lGridRefreshing=.T.
>ThisForm.ControlFile.RecordSource='Control'
>ThisForm.ControlFile.Refresh()
>DOEVENTS
>ThisForm.lGridRefreshing=.F.
>
>
>This is what I have in my form grid BeforeRowColChange():
>
>
>LPARAMETERS nColIndex
>
>MESSAGEBOX('in')
>* Used when we want to change the RecordSource of the grid and wish to preserve
>* the grid properties
>IF PEMStatus(ThisForm,'lGridRefreshing',5) AND ThisForm.lGridRefreshing
>MESSAGEBOX('in2')
>
> NODEFAULT
> RETURN
>ENDIF
>
>
>This never go in. Any idea?
Imagination is more important than knowledge