PC SOFT

WINDEV的在线文档

  • Overview
  • Automatic browsing Table control
  • Programming a programmed Browsing Table control
文档页面当前正在翻译。对于此延迟我们深表歉意。
您可以自愿地帮助我们翻译您想要的文档段落,然后只需通过以下地址与我们联系:info@cn.windev.com
产品
WinDevWebDev-服务器代码WebDev-浏览器代码WinDev Mobile报表和查询
平台
WindowsLinuxWindows MobileWindows PhoneWindows Store appsAndroidAndroid Widget iPhone/iPad
语言
JavaPHPAjax用户代码(MCU)外部语言
数据库
HFSQLHFSQL Client/Server存储过程HF 5.5OLE DBODBC本地访问

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: 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 to a query, the Table control can be initialized with the content of the file:
  • automatically: No specific code is required to initialize the Table control. The characteristics of the browse performed in the file linked to the control are described in the "Content" tab of the description window of the Table control.
  • by programming: The code used to browse the data file linked to the Table control must be entered in the different codes of the Table control. This method is not recommended.
Note: 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.

See Browsing Table controls and queries for more details.

Automatic browsing Table control
A browsing Table control is used to display data coming from a specific data source (data file, query, ...).

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
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.
  • Search 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
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 search key 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 H过滤器. 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 H过滤器 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.

Programming a programmed Browsing Table control
If you are using a Table control based on a file with programmed initialization, the code for file browse must be entered in the different processes associated with the control. This method is not recommended and it is kept for backward compatibility.

For example: Initializing a Table control with the customers found in CUSTOMER file.

// Initialize the Table control
H读第一个CUSTOMERNAME

// Previous record
H读上一个CUSTOMERNAME
// Next record
H读下一个CUSTOMERNAME
// Last record
H读最后一个CUSTOMERNAME