[求助]动态加载表格控件和数据源
表格控件可以动态加载,但数据源绑定无效(无法下拉,内容为空),不知原因?代码如下:
程序代码:
Thisform.grid1.RecordSourceType= 4 abc="select * from test into cursor temptest" Thisform.grid1.RecordSource='&abc' With Thisform.grid1 .COLUMN1.Width=180 .COLUMN2.Width=80 .COLUMN3.Width=80 .COLUMN1.HEADER1.Caption='状1态' .COLUMN2.HEADER1.Caption='回1退原因' .COLUMN3.HEADER1.Caption='使1用车型' .COLUMN3.AddObject('cbocar','combobox') .COLUMN3.CurrentControl="cbocar"&&设为当前 .COLUMN3.cbocar.DisplayCount=3 .COLUMN3.cbocar.RowSourceType=1 .COLUMN3.cbocar.RowSource="a,b,cf" .COLUMN3.cbocar.BoundTo=.T. .COLUMN3.cbocar.Value="hgdsh" .COLUMN3.cbocar.Visible=.T.&&让其可见 .COLUMN1.ControlSource='temptest.状态' .COLUMN2.ControlSource='temptest.回退原因' .COLUMN3.ControlSource='temptest.使用车型' Endwith
2014diaodu.rar
(2.88 KB)