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
  • Use conditions
  • The different types of column indexes
  • Move and anchor columns
  • Moving columns in horizontal Table controls
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
Moves a column in a Table or TreeView Table control.
Remarks:
  • To move a row in a Table control, use TableMoveLine.
  • This function is equivalent to the following manipulation in execution: click on a column header and move the column while holding down the left mouse button.
Ejemplo
// Move the "COL_ProductPrice" column 
// on the far left side in the "TABLE_ProductTable" control
TableMoveColumn(TABLE_ProductTable, COL_ProductPrice, 1)
Sintaxis
TableMoveColumn(<Table control> , <Column> , <Index of destination column>)
<Table control>: Control name
Name of the control to be used. This control can correspond to:
  • a Table control.
  • a TreeView Table control.
If this parameter corresponds to an empty string (""), the control to which the current event belongs will be used.
<Column>: Control name
Name of the column to move. The column name is returned by TableEnumColumn.
<Index of destination column>: Integer
New position of the column in the control. The first column (even if it is invisible) is column #1.
Observaciones

Use conditions

TableMoveColumn can be used on:
  • Table or TreeView Table controls based on a data file.
  • Table or TreeView Table controls populated programmatically.
  • single-selection or multi-selection controls.
WEBDEV - Código Servidor This function is available for Table controls in "Server" and "Server + AJAX" mode, and for TreeView Table controls.
WEBDEV - Código Navegador This function is available for Table controls in "Browser" mode only. The TreeView Table control is not available.

The different types of column indexes

There are 2 types of indexes for columns:
  • Visible position index: column index at runtime.
  • Creation index: column index when the Table field is created in the editor.
These indexes change if the user moves the columns.
TableMoveColumn uses the index of the visible position.

Move and anchor columns

  • If the column is moved among some anchored columns, this column automatically becomes anchored.
  • If the column is moved outside the anchored columns, this column is not anchored anymore.
WINDEVReportes y ConsultasJavaCódigo de Usuario (UMC)

Moving columns in horizontal Table controls

  • If TableMoveColumn is called on a horizontal Table control, the rows will be moved.
  • To move the columns in a horizontal Table control, use TableMoveLine.
Clasificación Lógica de negocio / UI: Código UI
Componente: wd300obj.dll
Versión mínima requerida
  • Versión 9
Esta página también está disponible para…
Comentarios
Retrieving the displayed position of a moved column
Once you move several columns, other columns will also change their position. Use TableColumnSubscription to find the position of the column as it is displayed.
With Columns - COL_name, COL_number, COL_size
Move COL_size - TableMoveColumn(MyTable, "COL_size", 1)
Where is COL_number?
TableEnumColumn(MyTable, 3) will return "COL_size"
TableColumnSubscript(MyTable,"COL_number",tcpDisplay) returns 3


Chris
07 10 2016

Última modificación: 27/03/2025

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