PC SOFT

WINDEV的在线文档

  • Characteristics of column elements
  • Position of the inserted column
  • Limits: Maximum number of displayed columns
  • Browsing table: Modifications in the linked data file
  • Browsing table: Inserting several columns
  • Inserting images
  • Table in edit
产品
WinDevWebDev-服务器代码WebDev-浏览器代码WinDev Mobile报表和查询
平台
WindowsLinuxWindows MobileWindows PhoneWindows Store appsAndroidAndroid Widget iPhone/iPad
语言
JavaPHPAjax用户代码(MCU)外部语言
数据库
HFSQLHFSQL Client/Server存储过程HF 5.5OLE DBODBC本地访问

表格插入列 (函数)

Inserts elements in the format of columns into an horizontal Table control.

Caution: This function cannot be used to insert columns into a standard Table control. To dynamically add columns into a standard Table control, use 控件克隆.

16版本和更高版本
WinDevLinux This function is now available for the WinDev applications in Linux.
16新版本
WinDevLinux This function is now available for the WinDev applications in Linux.
WinDevLinux This function is now available for the WinDev applications in Linux.

语法
表格插入列(<Table Name> [, <Subscript> [, <Element Column 1> [... [, <Element Column N>]]]])
<Table Name>: Character string (with or without quotes)
Name of the horizontal Table control to use.
If this parameter corresponds to an empty string (""), the Table control to which the current process belongs will be used.
<Subscript>: Optional integer
Subscript of the column into which the elements must be inserted. The subscript of the fist column is set to 1.
Subscript not specifiedThe column is inserted before the current column. If no column is selected, the column is inserted at the end of the Table control.
Subscript greater than the number of columns in the Table controlThe column is inserted at the end of the Table control.
Subscript equal to 0The column is inserted at the beginning of the Table control.
Subscript equal to -1The column is inserted before the current column.
<Element Column 1>: Type of the associated column (optional)
First column element that must be inserted into the specified Table control. Each element corresponds to a row in the Table control. The type of the inserted element must be compatible with the type of the relevant row.
If none of these parameters is specified, an empty column is added to the Table control. For a browsing Table control, the default values defined in the linked file are taken into account.
<Element Column N>: Type of the associated column (optional)
Nth column element that must be inserted into the specified Table control. Each element corresponds to a row in the Table control. The type of the inserted element must be compatible with the type of the relevant row.
If none of these parameters is specified, an empty column is added to the Table control. For a browsing Table control, the default values defined in the linked file are taken into account.

注意

Characteristics of column elements

  • To specify no value for one of the elements, use an empty string ("") or 0 (according to the type of the row).
  • If an element corresponds to the result of a calculation, the numeric expression must be enclosed in brackets. For example:
表格插入列TABLE_CalcTable3,(53+29),(83-21))

Position of the inserted column

By default, the column is inserted at the specified position.
  • If the Table control is sorted by 表格数据排序, the inserted column is positioned in the Table control according to the current sort (and not according to the specified subscript).
  • If the Table control is sorted by the user, the sort is ignored when the column is inserted. The column is inserted at the specified position.

Limits: Maximum number of displayed columns

The maximum number of columns that can be displayed in a Table control is limited by the amount of available memory (theoretical maximum: 2 billion columns).

However, we do not recommend using Table controls with a large number of rows for performance reasons (time required to fill the control for example) and for user-friendliness.

Browsing table: Modifications in the linked data file

If the cascading input is enabled, the data file linked to the browsing Table control is automatically modified when the user goes to the next column.

If the cascading input is not enabled, the data file linked to the browsing Table control is not modified. To write the record into the data file, 表格保存 must be run after 表格插入列.

Reminder: The "cascading input" option can be selected:

  • When creating a Table control.
  • In the "Details" tab of the description window of the Table control in the window editor.

Browsing table: Inserting several columns

Whenever 表格插入列 is called in a browsing Table control, a virtual column is created in the Table control. The information will be saved in the data file during the call to 表格保存.

If 表格插入列 is successively called in the same process without being followed by 表格保存, only the FIRST call is effective (the following calls are ignored). A single column is added into the browsing Table control.

Inserting images

To insert an image into a Table control, specify the name and the full path of the image to insert.

For example:

表格插入列TABLE_MyTable5"C:\MyDocuments\MyImage.BMP"

Note: The row must be an Image type row otherwise the inserted image will not be displayed properly.

Table in edit

If 表格插入列 is called:
  • In a process of the Table control, the cursor is automatically positioned on the first row to edit in the inserted column.
  • In a process that does not belong to the Table control, 重新输入 must be used to resume the input in the Table control.

组件
WinDev wd200obj.dll
Linux wd200obj.so