前提:将数据窗口的下tab键用回车键取代。
// event editchanged datawindowchild ldw_temp String ls_filter Long ll_start If dwo.Name = 'syjsf02' Then This.GetChild('syjsf02',ldw_temp) If Trim(Data)='' Or IsNull(Data) Then ls_filter = "" Else ls_filter = "(szzxm01 LIKE '" + Upper(Data) + "%') OR (szzxm08 LIKE '" + Upper(Data) + "%' ) or (szzxm09 like '" + Upper(Data) + "%' ) OR (szzxm02 LIKE '%" + Upper(Data) + "%')" End IF ldw_temp.SetFilter(ls_filter) ldw_temp.Filter() ll_start = This.SelectedStart() This.SelectText(ll_start,0) Return 1 END IF
//event itemchanged datawindowchild ldw_temp dec ldec_dj if dwo.name = 'syjsf02' then This.GetChild('syjsf02', ldw_temp) IF ldw_temp.RowCount() <= 0 THEN This.SetItem(This.GetRow(),'syjsf02','') ldw_temp.SETFILter("") ldw_temp.FIlter() setitem(row,'dj',0) RETURN 1 else This.object.syjsf02[row] = ldw_temp.getitemstring(ldw_temp.getrow() , 'szzxm01') ldec_dj = ldw_temp.getItemNumber(ldw_temp.getrow(),'nzzxm07') setitem(row,'dj',ldec_dj) ldw_temp.SETFILter("") ldw_temp.FIlter() return 2 END IF end if
// ue_enter datawindowchild ldw_temp This.GetChild('syjsf02',ldw_temp) ldw_temp.SETFILter("") ldw_temp.FIlter() this.setredraw(true)