public mcx[5]
mcx[1]=alltrim(upper(thisform.txtdah.value))
mcx[2]=alltrim(thisform.txtyjmlh.value)
mcx[3]=alltrim(thisform.txtxm.value)
mcx[4]=alltrim(thisform.txtcsrq.value)
mcx[5]=alltrim(thisform.txtsfzh.value)
mll=""
mll=mll+' .and. allt(lry)=xyz'
if mcx[1]<>"" then
mll=mll+' .and. '+"mcx[1] $ dah"
endif
if mcx[2]<>"" then
if len(alltrim(mcx[2]))=2 .and. alltrim(mcx[2])="1-" .or. alltrim(mcx[2])="2-" .or. alltrim(mcx[2])="3-" .or. alltrim(mcx[2])="4-" .or. alltrim(mcx[2])="5-" .or. alltrim(mcx[2])="6-" .or. alltrim(mcx[2])="7-" .or. alltrim(mcx[2])="8-" .or. alltrim(mcx[2])="9-"
mll=mll+' .and. '+"mcx[2] $ subs(yjmlh,1,2)"
else
mll=mll+' .and. '+"mcx[2] $ yjmlh"
endif
endif
if mcx[3]<>"" then
mll=mll+' .and. '+"mcx[3] $ xm"
endif
if mcx[4]<>"" then
mll=mll+' .and. '+"mcx[4] $ csrq"
endif
if mcx[5]<>"" then
mll=mll+' .and. '+"mcx[5] $ sfzh"
endif
if left(mll,6)=" .and." then
mll=subs(mll,8)
endif
sele b_dagl
set order to dahpxmlh
if mcx[1]#"" .or. mcx[2]#"" .or. mcx[3]#"" .or. mcx[4]#"".or. mcx[5]#"" then
set filter to &mll
else
set filter to allt(lry)=xyz
endif
go top
thisform.refresh
thisform.grid1.Column4.enabled=.t.
thisform.grid1.Column5.enabled=.t.
thisform.grid1.Column6.enabled=.t.
thisform.grid1.Column7.enabled=.t.
thisform.grid1.Column8.enabled=.t.
通过以上代码筛选后,直接在grid中修改数据,请问怎样优化以上代码,能在滑动grid滑块时不卡呢,是否与“工具”“选项”设置有关呢