[请教]以装载方式加载的表格,如何对行加载COMBO控件,并写入事件
If Used("test")Set Deleted On
This.grdFind.Column2.AddObject('cbocar','combobox')
*!* 设置表格和备注编辑框的数据源
This.grdFind.RecordSourceType=1
This.grdFind.RecordSource="test"
Else
This.grdFind.RecordSource=""
Endif
With This.grdFind
.AllowCellSelection=.F.
.ColumnCount=16
.LockColumns=2
.DeleteMark=.F.
.RecordMark=.F.
.GridLineColor=Rgb(192,192,192)
.Column1.Header1.Caption="司机安排"
.Column1.Width=55
.Column1.BackColor=Rgb(249,249,244)
.Column2.Header1.Caption="车辆安排"
.Column2.Width=55
.Column2.CurrentControl="cbocar"&&
.Column2.BackColor=Rgb(249,249,244)
.Column3.Header1.Caption="使用车型"
.Column3.Width=60
.Column4.Header1.Caption="事由"
.Column4.Width=30
.Column5.Header1.Caption="用车单位"
.Column5.Width=80
.Column6.Header1.Caption="用车时间"
.Column6.Width=100
.Column7.Header1.Caption="结束时间"
.Column7.Width=100
.Column8.Header1.Caption="出发地"
.Column8.Width=50
.Column9.Header1.Caption="目的地"
.Column9.Width=50
.Column10.Header1.Caption="人数"
.Column10.Width=10
.Column11.Header1.Caption="驻"
.Column11.Width=15
.Column12.Header1.Caption="备注"
.Column12.Width=100
If Used("test")
.SetAll("DynamicForeColor","IIF(ALLTRIM(test.出车事由)='会议',RGB(0,0,0),;
IIF(ALLTRIM(test.出车事由)='培训',RGB(0,128,0),RGB(255,0,0)))","Column")
.Column1.ControlSource="test.状态"
.Column2.ControlSource="test.回退原因"
.Column3.ControlSource="test.使用车型"
.Column4.ControlSource="test.出车事由"
.Column5.ControlSource="test.用车单位"
.Column6.ControlSource="test.用车时间"
.Column7.ControlSource="test.结束时间"
.Column8.ControlSource="test.出发地点"
.Column9.ControlSource="test.目的地"
.Column10.ControlSource="test.用车人数"
.Column11.ControlSource="test.过夜"
.Column12.ControlSource="test.备注"
Endif
Endwith
如何以代码方式加载列控件?
Column3.CurrentControl = "Combo1", ;
如何以代码方式加载Combo1事件
PROCEDURE combo1.GotFocus
*!* 按申请记录使用车型加载人车数据
thisform.grdTest. 3
thisform.grdTest.'select export_fa.assetname,export_fa.custodian from export_fa where export_fa.assettype=test.使用车型 into cursor temp'
ENDPROC