PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN

  • Type of browse
  • Handling the controls linked to a data file via properties
  • Modifying the properties linked to the browse of a control
  • Memory table
  • Memory List Box and Combo Box control
  • Limitations
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
For controls, the BrowsedItem property is used to:
  • Find out the item used to automatically browse the controls linked to a data file.
  • Modify the item used to automatically browse the controls linked to a data file. Then, the browse is reinitialized.
For a report based on a file, the BrowsedItem property is used to change the item used to loop through the file. In this case, this property can only be used in the opening process of the report.
Remark: This item is defined when creating the control or the report. This item can be modified in the "Data" tab of the element description.
Example
// -- Opening code of the report
// Change the browsed file
RPT_Report1.SourceName = Customer
// New search item for "Customer" file
RPT_Report1.BrowsedItem = CustomerID
WEBDEV - Server codeAjax
// Ascending sort on the names of companies
TABLE_CustomerTable.BrowsedItem = "-Company"
Syntax

Finding out the item used for the automatic browse in a browsing control Hide the details

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

Modifying the item used for the automatic browse in a browsing control 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 new item that will be used to automatically browse the specified control. This item must belong to the data file browsed by the control (returned or modified by the BrowsedFile property).
If the "-" sign is found before the item name, the browse is performed in descending order.
WEBDEV - Server codePHPAjax

Finding out the item used for the automatic browse of a browsing report Hide the details

<Browsed item> = <Report used>.BrowsedItem
<Browsed item>: Character string
Name of item used to automatically browse the specified report. This item belongs to the data file browsed by the report (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.
WEBDEV - Server codePHPAjax

Modifying the item used for the automatic browse of a browsing report 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 new item used to automatically browse the specified report. This item must belong to the data file browsed by the report (returned or modified by the SourceName property).
Remarks

Type of browse

  • Automatic browse: The browse of data file and the display of data in the control are automatically performed. 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 browse process is run for the specified object.
  • Programmed browse: The developer must program the browse of the data file and the display of data in the Table control.
    The "Read the first record", "Read the previous record", "Read the next record" and "Read the last record" processes are run. A programmed browse gives total control on the order and on the filter used for the records. However, a programmed browse is a lot more complex and slower than an automatic browse.

Handling the controls linked to a data file via properties

  • The records displayed in a control linked to a file come from the data file or from the query specified by BrowsedFile.
  • 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 linked to the browse of a control

To modify the BrowsedItem, Filter and BrowsedFile properties, 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 browse. These operations can become quite slow when they are performed on large data files.

Memory table

If a memory Table control must display data coming from a data file, a query or a view:
  • Create a memory Table control in the editor.
  • In your program, specify the item to loop through with the BrowsedItem property. This item must belong to the data file, to the query or to the view whose data will be displayed in the memory Table control.
  • 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.

Memory List Box and Combo Box control

If a memory List Box or Combo Box control must display data coming from a data file, a query or a view:
  • Create a memory List Box or Combo Box control in the editor.
  • Use FileToMemoryList to initialize 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.
WEBDEV - Server codePHP In a page, the BrowsedItem property applies only to:
  • Tables,
  • Loopers,
  • Versions 16 and later
    Linear loopers,
    New in version 16
    Linear loopers,
    Linear loopers,
  • List boxes,
  • Combo boxes,
  • Schedulers.
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment