急!!如何在insertrow时屏蔽子下拉数据窗口的参数?

JackII 2003-12-09 11:24:26
我在数据窗口a中的一个下拉数据窗口字段b设置了一个参数
当a进行 insertrow操作时,自动触发retrieve事件
可是不知道从什么地方传b的retrieve参数
请各位大侠 指点一二
不胜感激
...全文
87 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
GoldProgramer 2003-12-09
  • 打赏
  • 举报
回复
试试:
if row=0 then
return
end if
if dwo.name="mea_class" then
DataWindowChild dd_type
dw_1.GetChild("mea_type", dd_type)
dd_type.SetTransObject(SQLCA)
if IsNull(data) then
dd_type.Retrieve('%');
else
dd_type.Retrieve(Data);
end if;
end if
CodeMagic 2003-12-09
  • 打赏
  • 举报
回复
建议不要使用带参数的子数据窗口,使用数据窗口对象的GetValue和SetValue函数,它可以在数据窗口的列对象中实现下拉列表框的功能,具体情况看看帮助就知道怎么用的。
xiao_bai 2003-12-09
  • 打赏
  • 举报
回复
同意lmby。
例子: 窗口的open事件:
datawindowchild idwc_supply //instance varibles

dw_doc.getchild('customerno',idwc_supply)
idwc_supply.settransobject(sqlca)
ll_row = idwc_supply.retrieve()
if ll_row < 1 then idwc_supply.insertrow(0)
lmby 2003-12-09
  • 打赏
  • 举报
回复
//如果开始不知道dddw的检索参数是什么,可以欺骗dddw,让他认为已有了数据:
ldwc_name.insertrow( 0 )
dw_name.retrieve()
JackII 2003-12-09
  • 打赏
  • 举报
回复
我在 itemchanged()事件中的代码是这样的
if row=0 then
return
end if
if dwo.name="mea_class" then
DataWindowChild dd_type
dw_1.GetChild("mea_type", dd_type)
dd_type.SetTransObject(SQLCA)
dd_type.Retrieve(data)
end if

但是 当我执行dw_1.insertrow(0)时,它触发dw_1的retrieve事件
我从什么地方传dd_type的retrieve参数
才能屏蔽弹出的参数录入窗口?

609

社区成员

发帖
与我相关
我的任务
社区描述
PowerBuilder DataWindow
社区管理员
  • DataWindow社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧