- Using the ..BrowsedFile property
- Modifying the properties linked to the browse of a control based on a data file
- Type of browse
- Handling the controls based on a data file via the properties
- Limitations
BrowsedFile (Property) In french: FichierParcouru
..BrowsedFile is used to find out and modify the data source used to display records in controls based on a data file: - browsing Table or browsing Treeview Table controls,
- browsing List Box or ListView controls,
- browsing Combo Box controls,
- table columns whose type is browsing combo box,
- browsing Looper controls,
Versions 16 and later browsing Organizer controls, New in version 16 browsing Organizer controls, browsing Organizer controls, Versions 16 and laterbrowsing Scheduler controls, New in version 16browsing Scheduler controls, browsing Scheduler controls, Versions 16 and later browsing Treeview controls, New in version 16 browsing Treeview controls, browsing Treeview controls, Versions 17 and later browsing Organization Chart controls. New in version 17 browsing Organization Chart controls. browsing Organization Chart controls. Versions 19 and laterinternal windows (if the swipe is enabled). New in version 19internal windows (if the swipe is enabled). 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). Versions 18 and later New in version 18 Versions 21 and later New in version 21
// Displays all the customers in a Table control TABLE_Table1..BrowsedFile = "Customers" // Displays the entire content of the Qry_Customers query in a Table control TABLE_Table1..BrowsedFile = "Qry_Customers"
// Displays the contacts of the gAContact variable // gAContact is a gglContact variable TABLE_Table1..BrowsedFile = ":gAContact"
Syntax
Finding out the data file, the query or the variable used as data source Hide the details
<Browsed element> = <Control used>..BrowsedFile
<Browsed element>: Character string (with quotes) 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. The type of this control must be: - browsing table or treeview table,
- browsing list box or listview,
- browsing combo box,
- table column whose type is browsing combo box,
- browsing looper,
Versions 16 and later browsing organizer, New in version 16 browsing organizer, browsing organizer, Versions 16 and laterbrowsing scheduler, New in version 16browsing scheduler, browsing scheduler, Versions 16 and later browsing treeview, New in version 16 browsing treeview, browsing treeview, Versions 17 and later browsing organization chart. New in version 17 browsing organization chart. browsing organization chart. Versions 19 and laterInternal window. New in version 19Internal window. Internal window.
Modifying 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. The type of this control must be: - browsing table or treeview table,
- browsing list box or listview,
- browsing combo box,
- table column whose type is browsing combo box,
- browsing looper,
Versions 16 and later browsing organizer, New in version 16 browsing organizer, browsing organizer, Versions 16 and laterbrowsing scheduler, New in version 16browsing scheduler, browsing scheduler, Versions 16 and later browsing treeview, New in version 16 browsing treeview, browsing treeview, Versions 17 and later browsing organization chart. New in version 17 browsing organization chart. browsing organization chart. Versions 19 and laterInternal window. New in version 19Internal window. Internal window.
<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 ..BrowsedFile can be used during a programmed browse or during an automatic browse. If ..BrowsedFile is used to modify the data source used, the browse is re-initialized. 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 - Stop the browse by assigning an empty string ("") to ..BrowsedFile.
- Modify the relevant properties.
- Restart the browse with ..BrowsedFile.
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. - Automatic browse: 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 browse: The developer must program the reading of the data file and the display of the data in the control.
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 based on a data file via the properties - The records displayed in the browsing controls come from the data file or query specified by ..BrowsedFile.
- The sort direction is defined by ..BrowsedItem.
- Depending on the type of control, the records can be filtered by ..Filter or by HFilter.
..BrowsedFile only applies to the controls found in a window or in a page. This property only applies 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,
Versions 16 and later Browsing Organizer controls, New in version 16 Browsing Organizer controls, Browsing Organizer controls, Versions 16 and laterBrowsing Scheduler controls, New in version 16Browsing Scheduler controls, Browsing Scheduler controls, Versions 16 and later Browsing Treeview controls, New in version 16 Browsing Treeview controls, Browsing Treeview controls, Versions 17 and later Browsing Organization Chart controls. New in version 17 Browsing Organization Chart controls. Browsing Organization Chart controls. Versions 19 and laterinternal windows (if the swipe is enabled). New in version 19internal windows (if the swipe is enabled). internal windows (if the swipe is enabled).
This page is also available for…
|
|
|