powerbuilder:将下拉数据窗口与其父窗口链接
我有一个数据窗口(让它的名称为父窗口),在其中我显示另一个数据窗口(让我们称其为子窗口)作为下拉列表。父级采用两个检索参数,名为 org_id
和 pccc_id
。子级采用一个名为 org_id
的检索参数,该参数应与父级的 org_id
具有相同的值。现在我想链接这两个检索参数。
我怎样才能做到这一点?
I have a datawindow(let its name be parent), in which I am displaying another datawindow(let us call it the child) as a drop down list. The parent takes two retrieval argument, named org_id
and pccc_id
. The child takes one retrieval argument named org_id
, which should have the same value as the parent's org_id
. Now I want to link these two retrieval arguments.
How can I do that ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
首先,我想确认您正在使用所谓的下拉数据窗口(通常称为 dddw)来实现关系? Dddw 在 PB 中非常常见,因此在在线帮助或其他地方找到示例应该不难。
如果您实际上已经通过 dddw 执行此操作,那么我假设 dddw 代表父数据窗口结果集中的一列?在该窗口中,您可以编写代码来检索 dddw。这就是在许多应用程序中完成的方式,有时是在窗口的初始化事件或父数据窗口控件的事件中。
在许多情况下,dddw 显示代码表数据并且不需要参数,并且可以在其属性中设置为自动检索。如果 dddw 后面的数据窗口需要参数,请在帮助文件中查找 datawindowchild。一旦你掌握了 dddw 的底层 dw,你就可以对其进行操作。查看 getChild() 方法的帮助文件。
Firstly, I'd like confirm you are implementing the relationship using what's called a drop down datawindow (often referred to as a dddw)? Dddw's are very common in PB, so it should not be hard to find examples in the online help or elsewhere.
If you're in fact already doing it via dddw's, then I'm assuming the dddw represents a column in the result set of the parent datawindow? In the window, you can code for retrieval of the dddw. This is how it's done in many applications, sometimes in the window's initialization events or the parent datawindow control's events.
In many cases, the dddw is displaying code table data and doesn't require arguments, and can be set to autoretrieve in its properties. If the datawindow behind the dddw requires an argument, look up datawindowchild in the help files. You can manipulate the dddw's underlying dw once you have a handle to it. Check out the help files for method getChild().
在父窗口中..该列的 Getcolumname() 的项目焦点更改事件
下拉数据窗口...编写以下代码..
确保在 DropDown.Datawindow 中关闭自动检索属性。
确保为该下拉数据窗口提供检索参数。
In Parent Window..Item focus changed event for Getcolumname() of that column of
drop down datawindow...write the following code..
Ensure that, Auto Retrieve property off in DropDown.Datawindow.
make sure that you give retrieval argument for that dropdown datawindow.