AYUDA EN LÍNEA
 WINDEVWEBDEV Y WINDEV MOBILE

Este contenido se ha traducido automáticamente.  Haga clic aquí  para ver la versión en inglés.
Ayuda / WLanguage / Funciones WLanguage / Controles, páginas y ventanas / Funciones Tabla
  • Characteristics of column elements
  • Position of inserted column
  • Limits: Maximum number of columns displayed
  • Data-bound Table control: Changes to the linked data file
  • Data-bound Table control: Insert multiple columns
  • Inserting an image
  • Table control in edit mode
WINDEV
WindowsLinuxJavaReportes y ConsultasCódigo de Usuario (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Código Navegador
WINDEV Mobile
AndroidWidget Android iPhone/iPadIOS WidgetApple WatchMac Catalyst
Otros
Procedimientos almacenados
Inserts elements in the format of columns into a horizontal Table control.
Warning This function cannot be used to insert columns into a standard Table control. To dynamically add columns into a standard Table control, use ControlClone.
Sintaxis
TableInsertColumn(<Table control> [, <Index> [, <Element column 1> [... [, <Element column N>]]]])
<Table control>: Control name
Name of the Horizontal Table control to be used.
If this parameter corresponds to an empty string (""), the Table control used will be the one to which the current event belongs.
<Index>: Optional integer
Index of the column into which the elements will be inserted. The index of the first column is set to 1.
Index 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.
Index greater than the number of columns in the Table controlThe column is inserted at the end of Table control.
Index equal to 0The column is inserted at the beginning of Table control.
Index 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 Table control based on a data file, 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 Table control based on a data file, the default values defined in the linked file are taken into account.
Observaciones

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, enclose the numerical expression 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 with TableSort, the new column is positioned according to the current sort and not to the specified index.
  • 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 columns displayed

The maximum number of columns that can be displayed in a Table control is limited only by available RAM (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.

Data-bound Table control: Changes to the linked data file

If the cascading input is enabled, the data file linked to the 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 Table control based on a data file is not modified. To write the record into the data file, TableSave must be run after TableInsertColumn.
Reminder The "cascade entry" option can be selected:
  • When creating a Table control.
  • In the "Details" tab of the description window of Table control in the window editor.

Data-bound Table control: Insert multiple columns

A virtual column is created each time TableInsertColumn is called in a Table control based on a data file. 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). Only one column is added to the Table control based on a data file.

Inserting an image

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 To display the inserted image correctly, the line must be of type Image.

Table control in edit mode

If TableInsertColumn is called:
  • In a control event, the cursor is automatically positioned on the first row to edit in the inserted column.
  • In an event that does not belong to the control, (or in another process) SetFocusAndReturnToUserInput must be used to resume the input in the Table control.
Componente: wd300obj.dll
Versión mínima requerida
  • Versión 12
Esta página también está disponible para…
Comentarios
Haga clic en [Agregar] para publicar un comentario

Última modificación: 27/03/2025

Señalar un error o enviar una sugerencia | Ayuda local