PFC Guide Titlebar
HomeFAQLinksPFCMAGExtensionsDownloadWhat's NewSearch

Dropdown Search Service FAQ


Table of Contents

  1. Now that the user can enter any value, my users want me to make sure the entry is valid.
  2. My users complain that they cannot see the dropdown list as they type from the keyboard.
  3. Can I use the Dropdown Search service on a something other than a Data Window column?

My Dropdown Search service is not working.

Contributed by Sharon Buntz

  1. Check the column's "Allow Editing" property. The data column must be "editable" for the service to work.
  1. Of course, the column must be a DropDownDW style.
  1. You must also extend the script for the DataWindow's EditChanged and ItemFocusChanged events, per the instructions in the PFC Help. It is also not a bad idea to add a wrapper of IF IsValid(inv_dropdownsearch) THEN around those lines of code also. Plus include this. to explicitly reference the object.
In your Datawindow control's EditChanged event:
IF IsValid(this.inv_dropdownsearch) THEN
   this.inv_dropdownsearch.Event pfc_EditChanged (row, dwo, data)
END IF
In your Datawindow control's ItemFocusChanged event:
IF IsValid(this.inv_dropdownsearch) THEN
   this.inv_dropdownsearch.Event pfc_ItemFocusChanged (row, dwo)
END IF

Note: If you choose to add the above code to an ancestor such as u_dw, rather than including it at the lowest level descendant each time. Consider also adding and extra IF condition to exclude windows which already have code in their lowest level descendants, such as the PFC Filter window:

In your Datawindow control's EditChanged event:
IF IsValid(this.inv_dropdownsearch) AND parent.ClassName() <> "w_filtersimple" THEN
   this.inv_dropdownsearch.Event pfc_EditChanged (row, dwo, data)
END IF
In your Datawindow control's ItemFocusChanged event:
IF IsValid(this.inv_dropdownsearch) AND parent.ClassName() <> "w_filtersimple" THEN
   this.inv_dropdownsearch.Event pfc_ItemFocusChanged (row, dwo)
END IF

 

  1. You need to call inv_dropdownsearch.of_AddColumn ("<optional column name>") to add the columns to use the DropDown Search service.
  1. The DropDown Search service does not work properly on pre-loaded DataWindows. This is because the ItemFocusChanged event does not fire. The solution (compliments of Steve Benfield) is

Now that the user can enter any value, my users want me to make sure the entry is valid.

There is a helpful PFC Extension to help you accomplish this. Please see the DDDW Search Extension at this site.


My users complain that they cannot see the dropdown list as they type from the keyboard.

Contributed by Sharon Buntz

Let your users know that they may drop down the list from the keyboard by simply pressing F4.

By the way, changing the "Always Show List" attribute of the column makes the dropdown arrow and the editable gray bar stop showing. This seems like a bug of some sort. However, once users are aware of the F4 shortcut, they are not too insistent in having the list always dropdown.


Can I use the DropDown Search service on a something other than a DataWindow column?

Contributed by Sharon Buntz

Yes. The DropDown Search service can be used on a regular DropDownListBox control. Just place your regular DDLB control (u_ddlb) on your window/tab/etc and set this.ib_search = TRUE in its constructor event. That's it!

A handy use for one of these is on the log on window to allow your user to select a database for which to log onto.


Contributed by PFCGuide staff, except where noted otherwise.
PFCGuide is sponsored by Dynamic Technology Group
The information provided is for advice only and not to be considered a contract or a liability against Dynamic Technology Group.

Last revised: February 15, 2004 03:58 AM.