PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US

  • Characteristics of column elements
  • Position of 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
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
TableInsertColumn (Function)
In French: TableInsèreColonne
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 ControlClone.
Versions 16 and later
WINDEVLinux This function is now available for the WINDEV applications in Linux.
New in version 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.
Syntax
TableInsertColumn(<Table Control> [, <Subscript> [, <Element Column 1> [... [, <Element Column N>]]]])
<Table Control>: Control name
Name of 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 column into which the elements will be inserted. The subscript of first 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 Table control.
Subscript equal to 0The column is inserted at the beginning of Table control.
Subscript equal to -1The column is inserted before the current column.
<Element Column 1>: Type of associated column (optional)
First column element that will 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 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.
Remarks

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 calculation result, the numeric expression must be enclosed in brackets. For example:
    TableInsertColumn(TABLE_CalcTable, 3, (53+29), (83-21))

Position of inserted column

By default, the column is inserted at the specified position.
  • If the Table control is sorted by TableSort, 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 advise you to use Table controls with an important 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, TableSave must be run after TableInsertColumn.
Reminder: The "cascading input" option can be selected:
  • When creating a Table control.
  • In the "Details" tab of the description window of Table control in the window editor.

Browsing table: Inserting several columns

Whenever TableInsertColumn 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 TableSave.
If TableInsertColumn is successively called in the same process without being followed by TableSave, 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 full path of the image to insert.
For example:
TableInsertColumn(TABLE_MyTable, 5, "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 TableInsertColumn 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 not belonging to the Table control, ReturnToCapture must be used to resume the input in the Table control.
Components
WINDEVReports and Queries wd230obj.dll
Windows Mobile wp230obj.dll
Linux wd230obj.so
Minimum required version
  • Version 12
This page is also available for…
Comments
Click [Add] to post a comment