ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / WLanguage / WLanguage functions / Controls, pages and windows / Table functions
  • Characteristics of Table controls (by default)
  • Table control populated programmatically
  • Columns
  • Miscellaneous
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
Creates a Table control from the items of a data file (view or query). Each column of the control is bound to an item in the data file. The width of the columns changes automatically according to the data in the file or query.
This function is used to get a Table control adapted to the browse of a specific data file.
// Affiche le contenu du fichier de données "CLIENTS" dans un champ Table lié à un fichier de données 
BuildBrowsingTable(TABLE_TABLE1, "CLIENTS", taWithAutoID)
// Affiche le contenu d'une requête dans un champ Table par programmation
IF HExecuteQuery(REQ_LISTE_CLIENTS_ACTIFS) = True THEN
	BuildBrowsingTable(TABLE_CLIENTS, ...
			REQ_LISTE_CLIENTS_ACTIFS, taFillTable)
END
Syntax
BuildBrowsingTable(<Table control> , <Data file> [, <Options>])
<Table control>: Control name
Table field name (data-related Table field or programmatically populated Table field).
Warning: This field must exist in the. It may have been created by ControlCreate.
The records in the data file can be viewed directly if this parameter corresponds to a data-bound Table control.
<Data file>: Character string
Name of data file, view or query used as a base for creating the Table control.
<Options>: Optional constant (or combination of constants)
Configures the creation mode of columns in the Table control.
Operating mode with the constantDefault operating mode
taWithBinaryBinary items (link composite key for example) are added to the Table control.Default: Binary fields (e.g. compound link key) are not added to the Table control.
taWithAutoIDA column is generated for the automatic identifier.Default: No column for automation identifier.
taWithDetailsBindingA sub-table is automatically generated to display the bound items from the data files of the analysis. Default: No "line detail" window is displayed.
taSingleLineColumnBy default, text columns are created with the Multiline property set to False. Default: Text columns corresponding to memo items are multiline and other text columns are monoline.
taMultiLineColumnBy default, text columns are created with the Multiline property set to True. Default: Text columns corresponding to memo items are multiline and other text columns are monoline.
taKeepBrowseKeyThe search key of the data-bound Table control does not change (this search key is returned by the BrowsedItem property).Default setting: The first key item encountered is positioned as the browse item.
taKeepColumnThe existing columns in the Table control are not deleted.Default: Existing columns are deleted.
taImageSizeOnlyImage memo columns display size only and never load images. Default: Image memo columns display images.
taItemCaptionThe captions of items are used for the titles of columns.Default: Uses field name as column heading.
taByLogicalOrderThe columns are created according to the logical order of items defined in the data model editor.
For the queries, the logical order and the physical order of items are identical.
Default: The physical order of fields in the data file is used.
For the queries, the logical order and the physical order of items are identical.
taFillTableA Table control is populated programmatically with the contents of the data file (Caution: time-consuming operation that can saturate memory).Default: No table populated programmatically.
taWithAutoIDInput allowed in the column associated with the automatic identifier (if it exists and if the Table control is in edit).
taNoAdjustThe width of the columns is not adjusted (the records are not read).
taNoMemoTextThe 'text memo' items are not added into the Table control.Default: Text memo' fields are added to the Table control.
taNoMemoImageThe "image memo" items are not added into the Table control.Default: Image memo' fields are added to the Table control.
Remarks

Characteristics of Table controls (by default)

  • The columns of Table control defined in the editor are deleted.
  • The input modes defined in the editor for the Table control are kept.
  • A column whose type is identical to the item type is created for each item of the data file.
  • No column is created for the binary memo items (a column is created for the text memo items or for the image memo items).
  • The properties of Table controls and columns are updated to allow the file to be browsed through:
    <Table control>.BrowsedFile = <Data file name>

    and for each column:
    <Column name>.DataBinding = <Name of the bound item>
    <Nom Colonne>CategoryCurve = <Première clé du fichier de données>
WINDEVReports and QueriesUser code (UMC)

Table control populated programmatically

If <Table control> corresponds to a Table control populated programmatically, no data is displayed (the Table control is empty) but the Table control and column properties are assigned like in the case of a data-bound Table control.
To display data in the Table control, use the TableAdd or BuildBrowsingTable functions with the taFillTable constant.
Note The constant taRemplirTable constant cannot be used to populate programmatically a Table control with image memos. To add an image into a Table control populated programmatically, the corresponding file must be found in the application library (WDL file) or it must be accessible from the current computer.

Columns

The created columns are named "_COL1", "_COL2", "_COL3", etc. These columns are accessible through programming via the indirection operator { }.
You cannot write:
TABLE_TABLE1._COL1.Largeur = 120 // Génère une erreur "_COL1 inconnu"
You must write:
{"TABLE_TABLE1._COL1"}..Width = 120

Miscellaneous

  • BuildBrowsingTable traverses the data file. The current record may be modified once this function has been used.
  • Filling the table with the BuildBrowsingTable FUNCTION function is performed in a parallel background process: if the data source is a query, this query must not be released before the window is closed or the Table control reset.
Business / UI classification: UI Code
Component: wd300obj.dll
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 04/09/2025

Send a report | Local help