Select * from yourtable into cursor curGrid where .f. readwriteThen when you want to fill the grid
Select * from yourtable where somecondition into cursor curdummy thisform.lockscreen=.F. Select curGrid Zap Append from dbf('curdummy') yourgrid.refresh thisform.lockscreen=.T.The clue here, is that the grid is never "disconnected" from it's controlsource.
>IF thisform.opgSortDirection.option1.Value = 1 &&Ascending > SELECT * ; > FROM curBrowseModal ; > ORDER BY cSortSeqASC ASC ; > INTO CURSOR curBrowseModal >ELSE > SELECT * ; > FROM curBrowseModal ; > ORDER BY cSortSeqDSC DESC ; > INTO CURSOR curBrowseModal >ENDIF >>
>IF thisform.opgSortDirection.option1.Value = 1 &&Ascending > SELECT * ; > FROM curBrowseModal ; > ORDER BY cSortSeqASC ASC ; > INTO CURSOR curBrowseModalS >ELSE > SELECT * ; > FROM curBrowseModal ; > ORDER BY cSortSeqDSC DESC ; > INTO CURSOR curBrowseModalS >ENDIF >>