Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DDDW Filter

Status
Not open for further replies.

WhooRahh

Programmer
Oct 4, 2001
5
0
0
US
How do you filter dddw and not loose the display value for rows that are filtered out?
 
You will firstly need to get a reference to the datawindow child. Here is example code for doing that from PB help (I've modified the names of the variables slightly, to more closely following PB naming standards).
dw_1 is the main datawindow, and 'emp_state' is the name of the column in the datawindow object that the dddw is attached to.


DataWindowChild ldwc_state_child
integer li_rtncode
li_rtncode = dw_1.GetChild('emp_state', ldwc_state_child)



Once you have a reference to the dddw (ldwc_state_child), then you should be able to specify a SetFilter("your filter string") and Filter(), to filter the displayed values in the dddw.

 
The problem was not filtering the dddw it was loosing the display value after the filter was applied. To fix this I used a computed column with the same data type as the display value. I then filtered this dddw and never lost the display value. Once the user changes the value, I got the data value and set it in the appropriate column.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top