我实现的在当前姓名列中
下拉数据窗口模糊查询带出对应的用户信息
遇到一个问题
在列中
输入 一个名字
有同名的
但是 他的其它信息不一样
我想通过选择下拉的 不同行来取得
不同行的值
但是 对应列 的名称都没有改变
也就是说
对应列的取值都没有改变,这样也就不能去判断下拉数据窗口的行改变了
请问有什么办法,在当前取值不变的情况下,下拉窗口的行改变能触发什么事件呢
itemfocuschanged
rowfocuschanged
editchanged
itemchanged
都试过了不行
------解决方案--------------------
用PB 数据窗口的自定义事件,eventid: pbm_command,捕捉notificationcode值。见下例:
int iRet, iDWRow, iDDRow ,iNull
string sDWCol,sNull
DataWindowChild dwc
sDWCol = This.GetColumnName() // 是否是dddw
IF lower(this.Describe(sDWCol + '.Edit.Style')) <> 'dddw' then return
IF sDWCol = 'goods_id' THEN
IF notificationcode = 2313 THEN
iRet = This.GetChild(sDWCol, dwc)
iDWRow = This.GetRow()
iDDRow = dwc.GetRow()
IF iDDRow > 0 THEN
this.object.goods_chn_name[iDWRow] = dwc.getitemstring(iDDRow,'goods_chn_name')
this.object.supplier_material_no[iDWRow] = dwc.getitemstring(iDDRow,'material_no')
this.object.spec[iDWRow] = dwc.getitemstring(iDDRow,'spec')
this.object.count_unit[iDWRow] = dwc.getitemstring(iDDRow,'count_unit')
this.object.register_no[iDWRow] = dwc.getitemstring(iDDRow,'customer_register_no')
this.object.goods_origin[iDWRow] = dwc.getitemstring(iDDRow,'goods_origin')
this.object.reciever_no[iDWRow] = dwc.getitemstring(iDDRow,'reciever_no')
this.object.de1[iDWRow] = dwc.getitemstring(iDDRow,'de1')
this.object.de2[iDWRow] = dwc.getitemstring(iDDRow,'de2')
this.object.de3[iDWRow] = dwc.getitemstring(iDDRow,'de3')
this.object.de4[iDWRow] = dwc.getitemstring(iDDRow,'de4')
this.object.de5[iDWRow] = dwc.getitemstring(iDDRow,'de5')
this.object.de6[iDWRow] = dwc.getitemstring(iDDRow,'de6')
this.object.de7[iDWRow] = dwc.getitemstring(iDDRow,'de7')
this.object.de8[iDWRow] = dwc.getitemstring(iDDRow,'de8')
this.object.de9[iDWRow] = dwc.getitemstring(iDDRow,'de9')
this.object.de10[iDWRow] = dwc.getitemstring(iDDRow,'de10')
ELSE
END IF
END IF
IF notificationcode = 2048 THEN
iRet = This.GetChild(sDWCol, dwc)
iDWRow = This.GetRow()
iDDRow = dwc.GetselectedRow(0)
IF iDDRow > 0 THEN
this.object.goods_chn_name[iDWRow] = dwc.getitemstring(iDDRow,'goods_chn_name')
this.object.supplier_material_no[iDWRow] = dwc.getitemstring(iDDRow,'material_no')
this.object.spec[iDWRow] = dwc.getitemstring(iDDRow,'spec')
this.object.count_unit[iDWRow] = dwc.getitemstring(iDDRow,'count_unit')
this.object.register_no[iDWRow] = dwc.getitemstring(iDDRow,'customer_register_no')
this.object.goods_origin[iDWRow] = dwc.getitemstring(iDDRow,'goods_origin')
this.object.reciever_no[iDWRow] = wc.getitemstring(iDDRow,'reciever_no')
this.object.de1[iDWRow] = dwc.getitemstring(iDDRow,'de1')
ELSE
END IF
END IF
END IF