|
|
|
|
|
<Table>.SearchEverywhere (Function) In french: <Table>.CherchePartout Searches for a value in all the columns of the following controls: - Table control,
- TreeView Table control,
Table control displayed in a Combo Box control.
// Click code of the Button control [Search] nPos is int = TABLE_Order.SearchEverywhere(EDT_Search, searchContains) // If found IF nPos > 0 THEN // Selects the row TABLE_Order = nPos END
Syntax
<Result> = <Table control>.SearchEverywhere(<Search element> [, <Type of search> [, <Start>]])
<Result>: Integer - Index of the element found,
- -1 if the search failed.
The element found is not selected. To select the element found, use <Table>.SelectPlus.
<Table control>: Control name Name of the Table or TreeView Table control in which the search will be performed. The search is performed in all columns. <Search element>: Type of search element Value to search in all columns. The value is searched in visible text columns.Remark: The search is not case sensitive, even in exact-match searches. <Type of search>: Optional Integer constant Type of search to perform:
| | searchContains (Default value) | Generic search of type "Contains" <Result> corresponds to the index of the element with a value that contains <Search element>. | searchExactMatch | Exact-match search ("Equals to") <Result> corresponds to the index of the element with a value that is strictly equal to <Search element>. Caution: Spaces at the beginning of the text are ignored. | searchStartsWith | Generic search whose type is "Starts with" <Result> corresponds to the index of the element with a value that starts with <Search element>. Caution: Spaces at the beginning of the text are ignored. |
<Start>: Optional integer Index of the starting row for the search (1 by default). This parameter is ignored in Table controls based on a data file. Remarks Use conditions <Table>.SearchEverywhere can be used on: - a Table or TreeView Table with in-memory data source (this function is not available for Table or TreeView Table controls with direct access to the data source),
- Table or TreeView Table controls populated programmatically.
a table displayed in a Combo Box control. - a single-selection or multi-selection control.
For Table or TreeView Table controls based on a data file, the iteration mode must be automatic.
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|