If the datawindow tries to insert a new row, and the dddw is not yet populated, the response window asking for Retrieval Arguments will be displayed. Here are 3 ways to solve this problem:
- Get the handle of the DDDW using GetChild, SetTransObject() and Retrieve() before the parent is filled. Then filter the invalid rows based on the values of the columns entered. This works fine if there are only a modest number of rows in the DDDW universe and this data is static.
- Pre-store data in the DDDW in the DataWindow painter. Then filter the invalid rows based on the values of the columns entered. This requires the data to be static. If it is not, the datawindow has to be updated, and a new build will need to be deployed.
- Get the handle of the DDDW using Get Child and InsertRow() to give it a result set. The DDDW will have a blank row, but at least the annoying response window will not be in the user’s face. The row with the DDDW is protected until all the columns from which retrieval arguments are derived are entered. Then the DDDW is populated with a retrieve (or copied from a cache).
May 10, 2008 -
Posted by
rick130 |
Drop Down Data Window (DDDW) |
argument, message, messagebox, response, retrieval, retrieve, window |
1 Comment
In more recent versions of PowerBuilder, you simply turn off the AutoRetrieve property of the DDDW.