PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN

  • Filter property and browsing Table controls
  • Handling the browsing Table, List Box, ListView, Combo Box and Looper controls via the properties
  • Modifying the properties used to browse a browsing Table, List Box, ListView, Combo Box or Looper control
  • Limit
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
The Filter property is used to identify and change the filter applied to records in:
  • browsing Table controls,
  • browsing TreeView Table controls,
  • browsing List Box controls,
  • browsing Combo Box controls,
  • browsing Looper controls.
This filter (if it exists) can be defined during the control description ("Content" tab).
This filter (Filter property or filter defined in the editor) has the following characteristics:
  • "Starts with" filter.
  • applies to the search item only.
  • affects the object used (Table, Combo Box, List Box or ListView control)
  • does not affect the data file on which the object is based (except for the browsing Table controls, see below).
Remarks:
  • To use a filter on a composite key, use HFilter.
  • The Filter property cannot be used to identify filters defined by the user (with the TableEnableFilter function, for example).
Example
// - Code whenever a Combo Box control is modified
// Update elements of the Combo Box control according to
// the letters entered in the edit control of the Combo Box
COMBO_Element.Filter = COMBO_Element
// Identifies the filter condition on the City search key
IF TABLE_Customer.Filter = "" THEN
TABLE_Customer.Filter = "PARIS"
END
Syntax

Finding out the filter defined on the search item Hide the details

<Filter value> = <Control used>.Filter
<Filter value>: Type of filter
Current value of filter defined on the search item. This filter is a "Start with" filter.
<Control used>: Control name
Name of control whose current filter is requested: this filter is defined by the Filter property, or in the window or page editor (in the control description). This control must be a:
  • browsing List Box or ListView,
  • browsing Combo Box,
  • browsing Table or TreeView Table,
  • browsing Looper.

Modifying the filter defined on the search item Hide the details

<Control used>.Filter = <New filter value>
<Control used>: Control name
Name of control whose current filter will be modified. This control must be a:
  • browsing list box or listview,
  • browsing Combo Box,
  • browsing Table or TreeView Table,
  • browsing Looper.
<New filter value>: Type of filter
  • New value for the filter defined on the search key,
  • Empty string ("") for no filter.
Remarks

Filter property and browsing Table controls

For browsing Table controls, the Check Box "Use HFilter to browse the file" is used to keep the search and sort options on the filtered columns (magnifier, etc.).
If the option "Use HFilter to browse the file" is checked:
  • the property is not applied to the Table control only but it is also applied to the data file onto which the control is based. Therefore, a browse performed on the base file of the control will be filtered.
  • A filter (HFilter) is automatically applied to the data file onto which the Table control is based.
  • If a filter is defined on the data file (HFilter) BEFORE displaying the Table control (TableDisplay for example), only the filter of the Table control will be taken into account. Then, the data file will be browsed according to the filter of the Table control.

Handling the browsing Table, List Box, ListView, Combo Box and Looper controls via the properties

  • The records displayed in a browsing List Box, Table, Combo Box or Looper control come from the data file or query specified with the BrowsedFile property.
  • The sort direction is defined by the BrowsedItem property.
  • The records can be filtered using the Filter property or the HFilter function. Caution: the Filter property can only be used to apply a "Starts with" filter on the search key.

Modifying the properties used to browse a browsing Table, List Box, ListView, Combo Box or Looper control

To modify several properties (BrowsedItem, Filter and BrowsedFile), it is recommended to:
  1. Stop the browse by assigning an empty string ("") to the BrowsedFile property.
  2. Modify the relevant properties.
  3. Restart the browse with the BrowsedFile property.
This method is used to optimize the modifications performed. Indeed, each one of the modifications performed individually restarts the browse. These operations can become quite slow when they are performed on large files.

Limit

The Filter property only applies to controls in a window or page. This property only applies to the following controls:
  • Browsing List Box control,
  • Browsing ListView control,
  • Browsing Combo Box control,
  • Browsing Table control,
  • Browsing Looper control,
  • Browsing TreeView Table control.
Component: wd260.dll
Minimum version required
  • Version 17
This page is also available for…
Comments
Click [Add] to post a comment