>>Before closing the underlying table unbind the grid using RowSource = '' line and then re-bind with your
>>current code again after the table is opened again.
>
>
>I've always been surprised VFP did not automatically unbind when the associated data source goes out of scope. I think I will make that the default behavior in Visual FreePro.
FWIW, This behavior was added to VFP9:
Grids and RecordSource and ControlSource PropertiesIn Visual FoxPro 9.0 there is a change in Grid control behavior.
When the RecordSource property for a Grid control is set, Visual FoxPro 9.0 resets all ControlSource properties to the empty string ("") for all columns.
In earlier versions of Visual FoxPro, the ControlSource properties were not properly reset,
so problems could occur when a RecordSource with a different structure was later bound.
This change may impact scenarios involving Access and Assign methods
or BINDEVENT( ) function calls made against a Grid column's ControlSource property.
Thierry Nivelet
FoxinCloud
Give your VFP application a second life, web-based, in YOUR cloud
http://foxincloud.com/Never explain, never complain (Queen Elizabeth II)