ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Controls, pages and windows / Table functions
  • Type of search
  • Miscellaneous
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
<TreeView Table column>.SearchChild (Function)
In french: <Colonne Table hiérarchique>.ChercheFils
Warning
From version 27, TreeView Table column.SeekChild is kept for backward compatibility. This function is replaced by <TreeView Table column>.SearchChild.
Searches for a value in a column of a TreeView Table control, in a specified branch.
Example
// Searches for the "Shirt" element in the "COL_Product" column
// Generic search in the rows of level 2
ResSearch = COL_Product.SearchChild("Shirt", False, 2)
Syntax

Searching for a value by the index of the parent element Hide the details

<Result> = <Column>.SearchChild(<Search element> [, <Type of search> [, <Index of the parent element> [, <Source row>]]])
<Result>: Integer
  • Index of the element found,
  • -1 if no element corresponds to the search.
<Column>: Control name
Name of the column in which the search will be performed.
<Search element>: Type of search element
Element to be found in the specified column. If the type of the search element is:
  • "Date" or "Time": the search is performed on the returned value.
  • "Currency + Euro": the search is performed on the stored currency.
<Type of search>: Optional boolean
  • True (default value) if the search must be an exact-match search,
  • False if the search must be a generic search.
<Index of the parent element>: Optional integer
Index of the parent row in the hierarchy.
<Source row>: Optional integer
Number of the source row for the search. If this parameter is not specified, the search is performed in the entire column. This parameter is used to find all the occurrences of a string in a column.

Searching for a value by specifying the parent element Hide the details

<Result> = <Column>.SearchChild(<Search element> [, <Type of search> [, <Parent element> [, <Source row>]]])
<Result>: Integer
  • Index of the element found,
  • -1 if no element corresponds to the search.
<Column>: Control name
Name of the column in which the search will be performed.
<Search element>: Type of search element
Element to be found in the specified column. If the type of the search element is:
  • "Date" or "Time": the search is performed on the returned value.
  • "Currency + Euro": the search is performed on the stored currency.
<Type of search>: Optional boolean
  • True (default value) if the search must be an exact-match search,
  • False if the search must be a generic search.
<Parent element>: Optional integer
Content of the parent row in the hierarchy. This parameter corresponds to NULL by default: used to perform a search among the roots.
<Source row>: Optional integer
Number of the source row for the search. If this parameter is not specified, the search is performed in the entire column. This parameter is used to find all the occurrences of a string in a column.
Remarks

Type of search

  • Exact-match search: The elements whose value is strictly equal to <Search element> are returned by <TreeView Table column>.SearchChild. For example:
    // Return all the customers named "Doe" found in "COL_Name"
    COL_Name.SearchChild("Doe")
  • Generic search: The elements starting with <Search element> are returned by <TreeView Table column>.SearchChild. For example:
    // Return all customers whose name starts with "SMI"
    COL_Name.SearchChild("SMI", Faux)

Miscellaneous

  • The element found is not selected. <Table>.Position is used to position on the row and <Table>.SelectPlus is used to select the row.
  • The search performed by <TreeView Table column>.SearchChild is not case sensitive (uppercase/lowercase characters).
Component: wd300obj.dll
Minimum version required
  • Version 23
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 06/20/2023

Send a report | Local help