PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK
  • Overview
  • Automatic browsing Table control
  • Programming a programmed Browsing Table control
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
Table control linked to a data file or to a query
ODBCNot available with this kind of connection
Overview
A Table control can be used to display the content of a data file or the content of a query: the user can select one or more records from this file or query.
A Table control can be linked to:
  • an existing query: all you have to do is select this query among the queries of your project.
  • a query included in the Table control: this query will be created in the wizard for creating the Table control. This query will be available for this control only.
When a Table control is linked to a data file or a query, the Table control can be initialized with the content of the data file:
  • automatically: No specific code is required to initialize the Table control. The characteristics of the browse in the data file linked to the control are described in the "Content" tab of the Table control description window.
  • by programming: The code used to browse the data file linked to the Table control must be entered in the different events of the Table control. This method is not recommended.
Remark: When creating a Table control, the wizard asks for the information required to create the link between the control and a data file or a query.
Automatic browsing Table control
A browsing Table control is used to display data coming from a specific data source (data file, query, etc.).
The content of the Table control is defined during its creation and it can be modified in the description window of the control ("Content" tab).
This screen is used to define whether the Table control is a browsing or memory Table control. For a browsing Table control, this screen is used to define the characteristics of the browse performed in the data source:
  • Browsed file
File or query containing the data to display.
If the Table control is based on an embedded query, the name of the browsed file has the following format: <Window Name>_<Number>$Query. In this case, all the options of the "Embedded query" button are available.
  • Stored item (optional)
Item whose value is returned to the program when a row is selected in the Table control.
  • Automatic browse (described below)
If this option is checked, the runtime engine manages the file browse and the display of data in the Table control. No WLanguage code is required.
  • Browse item
Item used to browse the data source. The records displayed in the Table control will be sorted according to this item.
If <Automatic> is selected, the HFSQL engine will automatically select the best search key.
  • Reverse browse (descending)
The browse direction depends on the search item. The browse direction was defined in the data model editor, in the characteristics of the item.
If this option is checked, the browse direction used will be the reverse of the one defined in the data model editor.
  • Display the records whose browse item starts with
Condition used to filter the displayed records. This filter is a "Start with" filter and it is applied to the search item. To implement more complex filters, use HFilter. See Filter in the browsing Table controls for more details.
WINDEV Display the content while moving the scrollbar
If this option is checked, the size of the cursor for the vertical scrollbar will be proportional to the number of elements found in the Table control.
WINDEV Use HFilter to browse the file
Allows you to filter the records displayed in the Table control and the base data file of the control. See Filter in the browsing Table controls for more details.
Versions 23 and later
WINDEV Synchronize the display (HFSQL C/S)
New in version 23
WINDEV Synchronize the display (HFSQL C/S)
WINDEV Synchronize the display (HFSQL C/S)
This option automatically refreshes the browsing Table control as soon as the associated Client/Server HFSQL data file is modified..
Versions 23 and later
WINDEV Display more row details [ + ]
New in version 23
WINDEV Display more row details [ + ]
WINDEV Display more row details [ + ]
This option allows you to expand a row in the Table control to see records from other data files, related to the selected row.
Programming a programmed Browsing Table control
If you use a Table control based on a data file with programmed initialization, the code to browse the data file must be entered in the different events associated with the control. This method is not recommended and it is kept for backward compatibility.
For example: Initialization of a Table control with the customers of the CUSTOMER data file.
// Initialize the Table control
HReadFirst(CUSTOMER, NAME)

// Previous record
HReadPrevious(CUSTOMER, NAME)
// Next record
HReadNext(CUSTOMER, NAME)
// Last record
HReadLast(CUSTOMER, NAME)
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment