When we redefine the grid's recrdsource,then it's coulmn-controlsource will disappear,so you can try the process:
WITH THISFORM.GD_MYGRID
DECLARE GRIDARR[.COLUMNCOUNT]
FOR II=1 TO .COLUMNCOUNT
GRIDARR[II]=.COLUMNS[II].CONTROLSOURCE
NEXT II
.RECORDSOURCE=''
*****HERE IS THE PROCESS TO CHANGE NEW DATA FOR MY TABLE(TABLENAME)
.RECORDSOURCE='TABLENAME'
FOR II=1 TO .COLUMNCOUNT
.COLUMNS[II].CONTROLSOURCE=GRIDARR[II]
NEXT II
ENDWITH
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement