|
|
|
|
|
- Use conditions
- Special cases
- Tip for Table and TreeView Table controls based on a data file
- Native SQL Server Connector
- Miscellaneous
TableDisplay (Function) In french: TableAffiche Refreshes a Table or TeeeView Table control from a given position: - for a Table or TreeView Table control based on a data file: changes made in the linked data file are reflected in the control.
- for a Table or TreeView Table control populated programmatically: the calculated columns are re-calculated.
// Refresh the "TABLE_ProductTable" control from the beginning TableDisplay(TABLE_ProductTable, taStart)
Syntax
TableDisplay(<Table control> [, <Position>])
<Table control>: Control name Name of the control to be refreshed. This control can correspond to:- a Table control,
- a TreeView Table control.
If this parameter corresponds to an empty string (""), the control to which the current event belongs is refreshed. <Position>: Integer, character or constant (optional) Indicates the start position for the refresh. If this parameter is not specified:- For a control based on a data file, the function behaves as if the taInit constant was passed as parameter.
- For a control populated programmatically, the function has no effect.
This parameter can correspond to: - An integer. The refresh is performed from this position. The row selected in the control is not modified.
For a control based on a data file, the "Display a row" event of the <Position> row is executed. The row selected in the control corresponds to the current record in the data file. For a control populated programmatically, the <Position> row is displayed again. - A character or a constant:
| | | | | Table or TreeView Table control based on a data file | Table or TreeView Table control with in-memory data source | Table or TreeView Table control populated programmatically |
---|
taStart (Default value) | - Refreshes the control while being positioned at the beginning of control.
- The first control row is selected. This row corresponds to the first record of the datafile.
| No effect. | No effect. | taCurrentSelection | - Refreshes the control from the position of the selection bar.
- The position of selection bar is not modified. The current record in the data file will correspond to the record selected in the control (after TableDisplay is called).
| - Redisplays the control while re-initializing the values of calculated columns.
- The selected row is unchanged.
| - Redisplays the control while re-calculating the values of calculated columns.
- The selected row is unchanged.
| taCurrentRecord | - Re-runs the linked query if necessary.
- Takes into account the records added, modified or deleted by other computers.
- Selects the current record (if the browse defined in the control is performed on a unique key). If the current record is deleted or if it does not correspond to the filter, selects the next record that has not been deleted.
If duplicates are found on the browse item, the row selected among the duplicates will be undefined. - The scrollbar position is stored as long as the selection remains visible.
- Runs the initialization start and end events, then the "Select a row" event for the selected row (even if it is not modified).
This constant is not available. | No effect. | No effect. | taCurrentFirst | - Refreshes the control from the current record in the data file.
- The first control row is selected. This row corresponds to the current record.
| - Redisplays the control while recalculating the values of calculated columns.
- The selected row is unchanged.
| taInit | - Runs the initialization codes of control (initialization code and end of initialization code).
- Runs the initialization code of columns found in the control.
- Fills the control.
- The first row of Table control is selected. This row corresponds to the current record in the data file at the end of the initialization code in the control.
| No effect. | No effect. | taPrevious | - Refreshes the control while being positioned at the beginning of control of previous page (same as using the pager to access the previous page).
- The first visible control row is selected. This row corresponds to the current record in the data file.
This constant is not available. | No effect. | No effect. | taReExecuteQuery | - Re-runs the query linked to the control. For more details, see Table control and queries.
- Refreshes the control while being positioned at the beginning of control.
- The first control row is selected. This row corresponds to the first record in the query result.
Caution: Only the query linked to the control is run. If specific options have been specified by HExecuteQuery (with hModifyFile for example), these options are ignored. | No effect. | No effect. | taNext | - Refreshes the control while being positioned at the beginning of the Table control of the next page (same as using the pager to access the next page).
- The first visible control row is selected. This row corresponds to the current record in the data file.
This constant is not available. | No effect | No effect. |
Remarks Use conditions TableDisplay can be used on: - Table or TreeView Table controls based on a data file.
- Table or TreeView Table controls populated programmatically.
- a single-selection or multiselection control.
Special cases TableDisplay has no effect: - If <Position> is an integer and if this integer is invalid.
- If <Position> is an integer and <Table control> is a Table control based on a data file with a "bouncing scrollbar".
Reminder: The bouncing scrollbar is an old operating mode. With a bouncing scrollbar, the cursor returns to the middle of the track each time you click on the scrollbar arrow buttons (or by using the up arrow or down arrow of the keyboard). To create a bouncing scrollbar, uncheck "Proportional scrollbar" in the "Details" tab of the control description window.
Tip for Table and TreeView Table controls based on a data file To display a calculation in a calculated column or to format a cell ("red background if value greater than 50" for example), use the "Display a row" event of the control.
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|