ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / WLanguage / WLanguage properties / Properties associated with windows, pages and controls
  • Type of iteration
  • Manipulating the controls bound to a data file via properties
  • Modifying the properties of an iteration through a control based on a data file
  • Table populated programmatically
  • List Box and Combo Box control populated programmatically
  • Limitations
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
For controls, the BrowsedItem property is used to:
  • Get the item used to automatically loop through controls based on a data file.
  • Change the item used to automatically loop through controls based on a data file. Then, the iteration is reinitialized.
For a report based on a file, the BrowsedItem property is used to change the item used to loop through the data file. In this case, this property can only be used in the "Open" event of the report.
Remark: This item is defined when the field or report is created.. You can change this item in the "Data" tab of the description window.
Example
// -- Code d'ouverture de l'état
// Changement du fichier parcouru
ETAT_Etat1.NomSource = Client 
// Nouvelle rubrique de parcours du fichier "Client"
ETAT_Etat1.RubriqueParcourue = IDClient
WINDEVWEBDEV - Server codeJavaUser code (UMC)Ajax
// Tri décroissant sur les noms des sociétés
TABLE_TableClient.RubriqueParcourue = "-Société"
Syntax

Getting the item used for the automatic iteration in a control based on a data file Hide the details

<Browsed item> = <Control used>.BrowsedItem
<Browsed item>: Character string
Name of the item used to automatically loop through the specified control. This item belongs to the data file the control is based on (returned or modified with the BrowsedFile property).
If the "-" sign is used before the item name, the iteration is performed in descending order.
<Control used>: Control name
Name of the control to be used.

Changing the item used for the automatic iteration in a control based on a data file Hide the details

<Control used>.BrowsedItem = <New item>
<Control used>: Control name
Name of the control to be used.
<New item>: Character string
Name of the new item that will be used to automatically loop through the specified control. This item must belong to the data file the control is based on (returned or modified with the BrowsedFile property).
If the "-" sign is used before the item name, the iteration is performed in descending order.
WINDEVWEBDEV - Server codeReports and QueriesiPhone/iPadUser code (UMC)PHPAjax

Getting the item used for the automatic iteration in a report based on a data file Hide the details

<Browsed item> = <Report used>.BrowsedItem
<Browsed item>: Character string
Name of the item used to automatically loop through the specified report. This item belongs to the data file the report is based on (returned or modified by the SourceName property).
<Report used>: Name of the report
Name of the report based on a data file to be used.
WINDEVWEBDEV - Server codeReports and QueriesiPhone/iPadUser code (UMC)PHPAjax

Changing the item used for the automatic iteration in a report based on a data file Hide the details

<Report used>.BrowsedItem = <New item>
<Report used>: Name of the report
Name of report based on a data file to be used.
<New item>: Character string
Name of the new item used to automatically loop through the specified report. This item must belong to the data file the report is based on (returned or modified by the SourceName property).
Remarks

Type of iteration

  • Automatic traversal: Data file browsing and field display are automated.. No specific programming is required.
    The sort is performed on the search item defined in the "Content" tab of the object description. If a filter is specified ("Filter on the search item" in the "Content" tab of the object description), this filter is used. No iteration process is executed for the specified object.
  • Programmed path: The developer must program the path of the data file and the display of data in the Table field..
    The "Read the first record", "Read the previous record", "Read the next record" and "Read the last record" processes are run. 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.

Manipulating the controls bound to a data file via properties

  • The records displayed in a control bound to a file come from the data file or from the query specified with the BrowsedFile property.
  • The sort direction is defined by the BrowsedItem property.
  • The records can be filtered using the Filter property or the HFilter function.

Modifying the properties of an iteration through a control based on a data file

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

Table populated programmatically

If a Table control populated programmatically must display data coming from a data file, a query or a view:
  • Create a Table control populated programmatically in the editor.
  • In the code of the application, specify the item to loop through with the BrowsedItem property. This item must be in the data file, query or view whose data will be displayed in the Table control populated programmatically.
  • Use FileToMemoryTable to initialize the Table control with the desired data. The data will be sorted according to the specified search item.
  • The DisplayedItem property will be automatically initialized.

List Box and Combo Box control populated programmatically

If a List Box control or Combo Box control is programmed to display data from a data file, query or view:
  • Create a List Box or Combo Box control populated programmatically in the editor.
  • Use FileToMemoryList to populate the List Box or Combo Box control with the desired data.
  • The BrowsedFile, DisplayedItem, BrowsedItem and StoredItem properties will be automatically initialized.

Limitations

The BrowsedItem property applies only to:
  • the reports whose data source is a data file.
  • the controls (List Box, Table and Combo Box) of a window.
WINDEVAndroidiPhone/iPadJava In a window, the BrowsedItem property applies only to the following controls:
  • Table control.
  • TreeView Table control.
  • List Box control.
  • WINDEV ListView control.
  • Combo Box control.
  • WINDEV Organizer control.
  • WINDEV Scheduler control.
  • WINDEV TreeView control.
  • Internal window control (when swipe gestures are enabled).
WEBDEV - Server codePHP In a page, the BrowsedItem property applies only to the following controls:
  • Table control,
  • Looper control,
  • Linear Looper control,
  • List Box control,
  • Combo Box control,
  • Scheduler control.
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 09/24/2024

Send a report | Local help