RequestColumnFind - cDbCJGrid
Performs a find based on the data binding of this column
Type: Procedure
Parameters
| Parameter | Type | Description |
|---|---|---|
| iCol | Integer | The column Id for the find |
| eFindMode | Integer | May be any of the standard find modes, i.e., lt, le, eq, ge, or gt, or it may be either Next_Record, First_Record, or Last_Record |
| bEntUpdt | Integer | If True, perform entry update before Find |
Syntax
Procedure RequestColumnFind Integer iCol Integer eFindMode Integer bEntUpdt
Call Example
Send RequestColumnFind iCol eFindMode bEntUpdt
Description
RequestColumnFind is used to find a record based on the data in the grid and the binding information in the column object. The data in your columns is used to provide the seeding data for your find. The column binding information (piBindingTable and piBindingColumn) determines which index should be used for the find. Assuming that an index exists, the RequestColumnFind method can be used in different ways in grids. A find can be used to:
-
Find a new main table record, which will refresh the grid around this record.
-
Find a parent table record, which will change parent records in the existing row.
-
Find a parent table record, find the index in the main table that relates to it and refresh the grid around this record (a superfind).
Depending on how you are using your grid, you may want different combination of these find capabilities. The peRequestFindMode property lets you control this.
The following modes are supported:
| Constant | Meaning |
|---|---|
| rfmFindAll | Find on all main and parent table fields. If the find is based on an index in the grid's main table, the grid is refreshed. If the find is based on a parent table, the parent record is found within the existing row (i.e., the parent record is changed). If there is no index for the column, nothing happens. This is the default for cDbCJGrid objects. |
| rfmFindMainOnly | Find only on the grid's main-table and refresh the table. Do not perform parent finds. |
| rfmFindMainSuper | Find on the grid's main table and perform super-finds on the parent tables. A parent super-find occurs if the parent field has an index, and the main table has a indexed relationship to this parent. The parent record is found, the first related main table record is found and the grid is refreshed. This is useful with prompt lists and this is the default for cDbCJGridPromptList objects. |
| rfmFindParentOnly | Only find on parent tables and do regular parent finds (i.e., just change the parent record). This might often be a good choice for data entry grids where you only wish to support selecting and changing parent records within a single row. |
| rfmFindNone | All finding is disabled. Sometimes finding just gets in the way. |
If a table refresh occurs, the refresh is based on the table's current index ordering and not index used to perform the find.
The methods Find_GE, Find_Next, Find_Previous, Find_First and Find_Last are the find methods that are usually bound to menus, toolbars and keys. These all call Request_Find, which is the standard message used for finding in all DEOs. In grids, Request_Find calls RequestColumnFind, which performs the find. RequestColumnFind uses peRequestFindMode to determine how the find should proceed.
If the request is successful, Found is set to true.