Schultz’s PowerBuilder Notes

The Ol’ Hidden Items in the Dddw Problem Part II

We all eventually need to build a datawindow where the contents of a drop down list is dependent on the value of another column.

Filtering the available selections in the dddw for the current row is straight forward, just add the necessary filtering script in the RowFocusChanged and ItemChanged events.   (See DDDW Contents Based on the Value of Another Column for more information regarding this. ) But if you have a tabular view, problems may soon become apparent with dependent columns in some rows displaying code values instead of descriptions.

Continue reading


November 16, 2008 Posted by | Drop Down Data Window (DDDW) | , , , , , , , , , , , | 9 Comments

The ol’ Hidden Item in the Dddw Problem

I have a dddw which hides certain items by setting the row height for these hidden rows to 0. This allows the column for other rows to still display the non-selectable dddw rows. But by using the arrow key or hotkeys (first letter of the description) the user can still select these rows which have a height of zero. Continue reading

May 15, 2008 Posted by | Drop Down Data Window (DDDW) | , , , , , , , , , , , | 1 Comment


Use SetDetailHeight() to adjust the height of any rows in the dddw. Setting the height to zero will effectively remove the dddw item from view.

The hidden item still needs to be in the dddw so that the display value is shown on other rows. Note: the arrow key will allow the user to still select the hidden item. There is a superior way to hide dddw items which will be addressed in a later post.

//Do not allow the user to select Vacation from the dddw.
// Vacation must be created through Employee Home Page
dw_1.GetChild(“tm_off_cd”, ldwc_time_off_cd)
ldwc_time_off_cd.SetFilter(“cd_id = 1001”)  // filter out the non-vacation row, 1001 is code for vacation
ldwc_time_off_cd.SetDetailHeight(1, ldwc_time_off_cd.RowCount(), 0) // hide the vacation row
ldwc_time_off_cd.Filter //Unfiliter all rows, only the non-vacation rows are visible

May 12, 2008 Posted by | Drop Down Data Window (DDDW) | , , , , , , , , , | Leave a comment