|
|
|
|
|
- Overview
- Table control linked to a data file with automatic browsing
- data-bound Table control updated programmatically
Linking a Table control to a data file or query
Not available with this kind of connection
A Table control can be used to display the contents of a data file or query: a user can select one or more records from the data file or query. A Table control can be linked to: - an existing query Simply select this query from the list of queries in your project.
- a query integrated with the Table control This query will be created in the Table control creation wizard. This query will be available for this control only.
When a Table control is linked to a data file (or a query), the Table control can be initialized with the contents of the data file: - or automatically No specific code is required to initialize the Table control field. The options to loop through the data file linked to the control can be defined in the "Content" tab of the Table control description.
- or by programming It is necessary to enter the path code of the data file linked to the Table control in the various Table control events. This method is not recommended.
 This method is not available.
Note When creating a Table control, the wizard asks for the information needed to link the field to a data file (or query). Table control linked to a data file with automatic browsing A data-bound Table control displays data from a specific data source (data file, query, etc.). The content of the Table control is defined when it is created and can be modified in the description window ("Content" tab).
In this window, you can define whether the Table control is bound to a data file or is populated programmatically. For a data-bound Table control, you can define how to loop through the data source: | | | File or query containing the data to display. If the Table control is based on an embedded query, the name of the browsed file has the following format: <Window Name>_<Number>$Query. In this case, all the options of the "Embedded query" button are available. | | Item whose value is returned to the program when a row is selected in the Table control. | | If this option is checked, the runtime engine iterates over the file and displays the data in the Table control. No WLanguage code is required. | | Item used to loop through the data source. The records displayed in the Table control are sorted based on this item. If <Automatic> is selected, the HFSQL engine automatically selects the best search key. | - Reverse course (descending)
| The iteration direction depends on the browse item. The iteration direction is defined in the data model editor, in the characteristics of the item. If this option is checked, the iteration direction used will be the opposite of the one defined in the data model editor. | - Display records whose browse item begins with
| Condition used to filter the displayed records. This is a "Start with" filter and is applied to the browse item. To implement more complex filters, use HFilter. For more details on filters, see Filter in data-bound Table controls. | | If this option is checked, the size of the vertical scrollbar cursor will be proportional to the number of elements in the Table control. | | Allows you to filter the records displayed in the Table control and the base data file of the control. For more details on this option, see Filter in data-bound Table controls. | | This option automatically refreshes the data-bound Table control as soon as the associated Client/Server HFSQL data file is modified. | | This option allows you to expand a row in the Table control to see records from other data files that are bound to the selected row. |
data-bound Table control updated programmatically If you use a data-bound Table control with programmed initialization, the code to loop through the data file must be entered in the different events associated with the control. This method is not recommended and is only kept for backward compatibility. For example Initialization of a Table control with the clients of the CLIENT data file.
HReadFirst(CLIENT, NOM)
HReadPrevious(CLIENT, NOM)
HReadNext(CLIENT, NOM)
HReadLast(CLIENT, NOM)
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|