1. Raj Kumar
  2. PowerBuilder
  3. Monday, 29 July 2019 08:54 AM UTC

Hello all,

 

I am trying to implement the PFC dropdown datawindow search but I can only make it to work in datawindows that have one column only (the dddw). I am not sure why this is not working for datawindows which have multiple columns from which only one is a dddw and needs to be searched.

Here is the code I am using for reference:

 

Constructor:

dw_emp.of_SetDropDownSearch(TRUE)
dw_emp.inv_dropdownsearch.of_Register("ac_key")

Editchanged:

if IsValid (inv_dropdownsearch) then
    inv_dropdownsearch.event pfc_editchanged (row, dwo, data)
end if

Itemfocuschanged:

inv_dropdownsearch.Event pfc_ItemFocusChanged (row, dwo)
 
 
Thank you very much!
Accepted Answer
René Ullrich Accepted Answer Pending Moderation
  1. Monday, 29 July 2019 11:11 AM UTC
  2. PowerBuilder
  3. # Permalink

Hi Raj,

I have working it also in datawindows with more columns. Your code seems to be ok. Check the return code of of_register function. It should be 1.

You may try to call the of_register function without a parameter to register all columns the service supports.

Remember that

- the column have edit style dddw or ddlb

- for dddw the display column is specified

- dddw display column data type is a character type

For dddw columns the service also stores the DataWindowChild for the column. If you do some changed to the datawindow that destroys the DataWindowChild you have to re-register the column.

HTH,

René

Comment
  1. Raj Kumar
  2. Monday, 29 July 2019 18:28 PM UTC
Thanks René! Changing the call of the of_register function to no parameter did the trick!

  1. Helpful
There are no comments made yet.


There are replies in this question but you are not allowed to view the replies from this question.