Schultz’s PowerBuilder Notes

PFC DropdownDatawindow Search Service


The dropdowndatawindow search service enhances data entry into a dropdowndatawindow by automatically scrolling and filling in the field as a match is found on typed characters. It includes the following features:

  • Register one or all DDDW columns with the service
  • Obtain a list of the registered columns
  • Unregister a column from the service

How Do I set this up

In the constructor event, turn the service on and register the column

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

In the EditChanged event of the dw, you will need this code. (you probably have this in the ancestor)

// Send event notification to dropdownsearh service if available
if IsValid (inv_dropdownsearch) then
    inv_dropdownsearch.event pfc_editchanged (row, dwo, data)
end if

In the DataWindow control’s ItemFocusChanged event, add a call to the n_cst_dwsrv_dropdownsearch pfc_ItemFocusChanged event: (You probably have this already in ancestor script).

inv_dropdownsearch.Event pfc_ItemFocusChanged (row, dwo)

July 2, 2008 - Posted by | 3. PFC, Datawindow Services | , , ,

No comments yet.

Leave a Reply