grid表格显示问题
表单init事件中
sqlexec(con,"select a,b,c,d,e,f,g from test","tmp")
select tmp &&tmp表格栏位不止上面7个,其它多余不显示
with thisform.grd
.recordsource="tmp"
.column1.controlsource="tmp.a"
.column1.controlsource="tmp.b"
.column1.controlsource="tmp.c"
.column1.controlsource="tmp.d"
.column1.controlsource="tmp.e"
.column1.controlsource="tmp.f"
.column1.controlsource="tmp.g"
endwith
****以上正常显示****
tmp表数据有更新,并且更新成功,数据有回传到sqlserver后台数据库
当通过重提数据:sqlexec(con,"select a,b,c,d,e,f,g from test","tmp")
select tmp
with thisform.grd
.recordsource=null
.recordsource="tmp"
.column1.controlsource="tmp.a"
.column1.controlsource="tmp.b"
.column1.controlsource="tmp.c"
.column1.controlsource="tmp.d"
.column1.controlsource="tmp.e"
.column1.controlsource="tmp.f"
.column1.controlsource="tmp.g"
endwith
出现tmp全部栏都显示,grid1表格全变了
如何能保持init时grid1的数据格式?????求解
[解决办法]
在
sqlexec(con,"select a,b,c,d,e,f,g from test","tmp")
之前加
thisform.grd.recordsource=null