ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / Developing an application or website / Controls, windows and pages / Controls: Available types / Table control / Table based on a data file
  • Overview
  • Notes
  • Limitations for Android
  • Limitations for iOS
  • Table controls with direct access to the data source and with in-memory data source
  • Types of Table controls based on a data file
  • Limitations in Java: Cascading input
  • Automatic synchronization (HFSQL Client/Server data)
  • Automatic view of bound records
  • Implementation via the window editor (automatic mode)
  • Implementation via the window editor (custom mode)
  • Implementation through programming
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
Overview
A Table control based on a data file is a control whose columns are bound to the items of a data file or query (data source). Each Table control column can be:
  • Bound to an item of the data source.
  • Bound to an item of a data file related to the data source.
  • Calculated: If the column is not bound to a data file item, then it is a calculated column. For calculated columns, the content of the column is recalculated each time a row is displayed.
Each row in the Table control corresponds to a record of the data source.
A table based on a data file control is used to:
  • View the content of a data file (or query) with one record per row and select a record (view the entire file or a selection of records selected according to a filter).
  • WINDEV View the content of bound records (for example, view the order lines associated with an order displayed in the Table control).
  • Delete a record by deleting a row from the Table control.
  • Modify a record by modifying the content of a row found in the Table control.
  • Add a record by entering a row in the Table control.
  • WINDEVHFSQL Client/Server Automatically refresh the data modified from another computer.
The number of records that can be viewed is unlimited, but only the visible rows in the Table control are loaded in memory.
WEBDEV - Server code Remark: When creating a non-Ajax Table control based on a data file, a pager is automatically associated with this control. This pager is used to display the records from the Table control.

Notes

  • Table controls based on a data file are mainly used to view data. To enter data, use the Edit controls.
  • The row selected in the Table control corresponds to the current record in the data file. If the position is set to a different row in the Table control, the position in the data file also changes to the corresponding record.
Android

Limitations for Android

  • Data input is not available in Table controls based on a data file. TableAdd, TableAddLine, TableInsert, TableInsertLine, TableModify and TableModifyLine are not available on Table controls based on a data file.
  • Only the automatic iteration is available for Table controls based on a data file. The programmed iteration is not available.
  • Table controls with in-memory data source are not limited.
iPhone/iPad

Limitations for iOS

The Table controls are available in read-only: data input is not available in this version.
Table controls with direct access to the data source and with in-memory data source
WINDEVWEBDEV - Server codeAndroidiPhone/iPadJava

Types of Table controls based on a data file

There are two types of Table controls based on data files:
  • Table controls with direct access to the data source. These are the "standard" Table controls based on a data file.
  • Table controls with in-memory data source. Only a specific number of file records (specified in the editor) are loaded in memory. These Table controls are mainly used to perform sorts and searches on any column.
    Android You cannot define the number of records loaded in memory.
For more details on these two types of Table controls, see Comparison between the features of Table controls.
Java

Limitations in Java: Cascading input

In Java, cascading input operations are not available for Table controls with direct access to the data source. Cascading input operations are only available for Table controls with in-memory data source.
WINDEV
Automatic synchronization (HFSQL Client/Server data)
A Table control based on a data file can be automatically refreshed, as soon as the associated HFSQL Client/Server data file is modified. This feature can be defined:
  • in the editor:
    1. Open the Table control description window.
    2. In the "Content" tab, select the display synchronization mode:
      Synchronizing the display
      • Never: No synchronization is performed (default case).
      • Modification only: The synchronization is performed when modifying a record.
      • Addition/Deletion only: The synchronization is performed when adding or deleting a record
      • Always: The synchronization is performed when records are written to or deleted from the data file.
    3. Validate.
  • programmatically: using the SynchroHFSQL property in the Table control.
The automatic synchronization is performed:
  • between the different instances of the same application on a computer or different computers,
  • between different applications on one or multiple computers,
  • between the different windows of the same application, whether or not the HFSQL context is the same between the windows.
Caution: Enabling this feature increases the server load when displaying the Table control or when elements are moved within the control.
WINDEV
Automatic view of bound records
In a Table control based on a data file, you can expand a row to see the records from other data files bound to the selected row.
Example:
Bound records

Implementation via the window editor (automatic mode)

To allow the user to expand rows in a Table control based on a data file to see the bound records:
  1. Open the Table control description window.
  2. In the "Content" tab, check "Show row details with [ + ]".
    Show details
    The settings window appears automatically.
  3. In the settings window:
    Automatically bound records
    • If necessary, check "Display bound data".
    • Select the "Automatic" display mode. In this mode, all related data files are shown to the user.
    • Validate.
  4. Validate the Table control description window.
At runtime, a context menu allows the user to see the data related to the data file currently displayed in the Table control.
Bound records
Bound records
Remark: the image of the "+" sign displayed at the beginning of the row can be customized:
  1. Open the Table control description window.
  2. In the "Style" tab:
    • Select "[+]/[-] image IW for row details".
    • Click the "Plus/Minus image of the details internal window" button.
    • Select the image corresponding to the button and validate.

Implementation via the window editor (custom mode)

To allow the user to expand rows in a Table control based on a data file to see the bound records:
  1. Open the Table control description window.
  2. In the "Content" tab, check "Show row details with [ + ]". The settings window appears automatically.
  3. In the settings window:
    • If necessary, check "Display bound data".
    • Select the "Manual" display mode. In this mode, only the data from one data file is shown to the user. You can customize the data to be displayed.
    • Select the source item in the data file displayed by the Table control.
    • Select the bound item in the linked data file.
    • Select the items that will be displayed in the table of bound data. You can use the and buttons to choose the information to be displayed.
      Selecting row details
    • Validate.
  4. Validate the Table control description window.
At runtime, a "+" sign allows the user to see the data related to the data file currently displayed in the Table control.
Details view
Remark: the image of the "+" sign displayed at the beginning of the row can be customized:
  1. Open the Table control description window.
  2. In the "Style" tab:
    • Select "[+]/[-] image IW for row details".
    • Click the "Plus/Minus image of the details internal window" button.
    • Select the image corresponding to the button and validate.

Implementation through programming

To allow the user to expand rows in a Table control based on a data file to see the bound records:
  1. Create a Table control based on a data file or query.
  2. In the Table control initialization code, use the RowDetailsBinding property.
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 07/03/2023

Send a report | Local help