假设该列为 a, 则可以在datawindow 的 editchanged 事件中这么写
int i
int li_pos
string lsdata
if string(dwo.name)='a' then
li_pos = selectedstart( )
parent.title = string(li_pos)
for i=1 to len(data)
if not Match( mid(data,i,1) , "[0-9-]") then
li_pos --
continue
end if
lsdata+=mid(data,i,1)
next
this.settext(lsdata)
this.selecttext(li_pos,0)
end if