ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE


This content has been translated automatically.  Click here  to view the French version.
  • Using the BrowsedFile property
  • Modifying the properties linked to the browse of a control based on a data file
  • Type of iteration
  • Handling the controls based on a data file via the properties
  • Limits
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
The BrowsedFile property is used to get and change the data source used to display records in controls based on a data file:
  • Table or TreeView Table controls based on a data file.
  • List Box or ListView controls based on a data file.
  • browsing Combo Box controls.
  • table columns whose type is browsing combo box.
  • the fields Repeated zone file.
  • WINDEV browsing Organizer controls.
  • browsing Scheduler controls.
  • WINDEV browsing Treeview controls.
  • WINDEV browsing Organization Chart controls.
  • New in version 28
    Kanban fields file.
  • internal windows (if the swipe is enabled).
  • supercontrols.
This data source can be:
  • a data file or a query. The records displayed come from this data file or from this query.
  • a variable (array, class member, advanced member, ...)
This data source is defined during the control description ("Content" tab).
Example
// Affiche tous les clients dans un champ Table
TABLE_Table1.FichierParcouru = "Clients"
// Affiche tout le contenu de la requête Req_Clients dans un champ Table
TABLE_Table1.FichierParcouru = "Req_Clients"
 
// Affiche les contacts de la variable gUnContact
// gUnContact est une variable de type gglContact
TABLE_Table1.FichierParcouru = ":gUnContact"
Syntax

Getting the data file, the query or the variable used as data source Hide the details

<Browsed element> = <Control used>.BrowsedFile
<Browsed element>: Character string
Name of the element used as data source for the relevant control. This element can correspond to:
  • the name of the data file or query.
  • the name of the variable. This name has the following format ":<prefix><Variable name>" or ":<Variable name>". The prefix is applied only if the code style is enabled in the project.
<Control used>: Control name
Name of the control whose data source is requested. This control must be a:
  • table based on a data file or TreeView Table, .
  • List file, ListView file.
  • Combo Box file.
  • table column of combo file type.
  • Looper based on a data file.
  • WINDEV Agenda fichier.
  • Planning fichier.
  • WINDEV Tree file.
  • WINDEV browsing organization chart.
  • Internal window.
  • New in version 28
    Kanban fichier.

Changing the data file, query or variable used as data source Hide the details

<Control used>.BrowsedFile = <New data source>
<Control used>: Control name
Name of the control whose current data source must be modified. This control must be a:
  • table based on a data file or TreeView Table, .
  • List file, ListView file.
  • Combo Box file.
  • table column of combo file type.
  • Looper based on a data file.
  • WINDEV Agenda fichier.
  • Planning fichier.
  • WINDEV Tree file.
  • WINDEV browsing organization chart.
  • Internal window.
  • New in version 28
    Kanban fichier.
<New data source>: Character string
Name of the element that must be associated with the relevant control:
  • Name of the data file or name of the query.
  • Variable name. This name has the following format ":<prefix><Variable name>" or ":<Variable name>". The prefix must be specified only if the code style is enabled in the project (no matter whether prefixes are displayed or not).
The control will be empty if this parameter does not correspond to a valid name. The browse will be stopped if this parameter corresponds to an empty string.
Remarks

Using the BrowsedFile property

The BrowsedFile property can be used both in programmed and automatic iteration operations
If the BrowsedFile property is used to change the data source used, the browse operation starts over again. For a Table control, this operating mode is identical to the use of TableDisplay associated with the taStart constant.

Modifying the properties linked to the browse of a control based on a data file

To modify multiple properties (BrowsedItem, Filter and BrowsedFile) it is recommended to:
  1. Stop the browse by assigning an empty string ("") to the BrowsedFile property.
  2. Modify the relevant properties.
  3. Restart the browse with the BrowsedFile property.
This method is used to optimize the modifications performed. Indeed, each one of the modifications performed individually restarts the iteration. These operations can become quite slow when they are performed on large data files.

Type of iteration

  • Automatic iteration: WINDEV, WEBDEV and WINDEV Mobile manage the reading of the data file and the display of the data in the control. No specific programming is required.
    If the control can be sorted (table, ...), the sort is performed on the search item defined in the "Content" tab of the element description.
    If a filter is specified ("Filter on the search item" in the "Content" tab of the object description), this filter is used.
  • Programmed iteration: The developer must program the reading of the data file and the display of the data in the control.
    A programmed iteration allows you to sort and filter records with precision. However, a programmed iteration is slower and more complex than an automatic iteration.

Handling the controls based on a data file via the properties

  • The records displayed in the browsing controls come from the data file or query specified by the BrowsedFile property.
  • The sort direction is defined by the BrowsedItem property.
  • Depending on the type of control, the records can be filtered by Filter or by HFilter.

Limits

The BrowsedFile property applies only to controls in a window or page. This property applies only to the following controls:
  • Browsing Table controls, browsing TreeView Table controls,
  • Browsing List Box, browsing ListView controls,
  • Browsing Combo Box controls,
  • Supercontrols,
  • Table columns (used to modify the data file linked to a Combo Box table column).
  • Browsing Looper controls,
  • WINDEV Browsing Organizer controls.
  • Browsing Scheduler controls.
  • WINDEV Browsing Treeview controls.
  • WINDEV Browsing Organization Chart controls.
  • internal windows (if the swipe is enabled).
  • New in version 28
    Kanban fields file.
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment