PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Use conditions
  • The different types of column subscripts
  • Move and anchored column
  • Move and horizontal Table control
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
Moves a column in a Table or TreeView Table control.
Notes:
  • To move a row in a Table control, use TableMoveLine.
  • This function is equivalent to the following operation performed at run time: click the header of a column and move the column while keeping the left mouse button down.
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.
Versions 19 and later
WEBDEV - Server codeLinux This function is now available for the WEBDEV sites in Linux.
WEBDEV - Server codeWindows This function is available in WEBDEV Server for the Ajax Table controls and for the TreeView Table controls.
WEBDEV - Browser code This function is now available in Browser code for the Browser Table controls.
New in version 19
WEBDEV - Server codeLinux This function is now available for the WEBDEV sites in Linux.
WEBDEV - Server codeWindows This function is available in WEBDEV Server for the Ajax Table controls and for the TreeView Table controls.
WEBDEV - Browser code This function is now available in Browser code for the Browser Table controls.
WEBDEV - Server codeLinux This function is now available for the WEBDEV sites in Linux.
WEBDEV - Server codeWindows This function is available in WEBDEV Server for the Ajax Table controls and for the TreeView Table controls.
WEBDEV - Browser code This function is now available in Browser code for the Browser Table controls.
Example
// Move the "COL_ProductPrice" column
// on the far left side in the "TABLE_ProductTable" control
TableMoveColumn(TABLE_ProductTable, COL_ProductPrice, 1)
Syntax
TableMoveColumn(<Table Control> , <Column Name> , <Subscript of Destination Column>)
<Table Control>: Control name
Name of control to use. 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 process belongs will be used.
<Column Name>: Character string (with or without quotes)
Name of the column to move. The name of a column is returned by TableEnumColumn.
<Subscript of Destination Column>: Integer
New position of the column in the control. The first column (even if it is invisible) is column #1.
Remarks

Use conditions

TableMoveColumn can be used on:
  • a browsing or memory control,
  • a single-selection or multi-selection control.
WEBDEV - Server code This function is available for the Ajax Table controls, the classic Table controls and the TreeView Table controls.
WEBDEV - Browser code This function is available for the browser Table controls only. The TreeView Table control is not available.

The different types of column subscripts

Two types of subscripts are available for the columns:
  • Subscript of the visible position: subscript of the column at run time.
  • Creation subscript: subscript of the column when creating the Table control in the editor.
These subscripts are different if the columns have been moved by the user.
TableMoveColumn is using the subscript of visible position.

Move and anchored column

  • 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.
WINDEVReports and QueriesWindows MobileJavaUser code (UMC)

Move and horizontal Table control

  • The rows will be moved if TableMoveColumn is used on an horizontal Table control.
  • To move the columns in an horizontal Table control, use TableMoveLine.
Components
WINDEVReports and Queries wd230obj.dll
WEBDEV - Server code wd230page.dll
Windows Mobile wp230obj.dll
WEBDEV - Browser code WDJS.DLL
Java wd230java.jar
Linux wd230obj.so
Minimum required version
  • Version 9
This page is also available for…
Comments
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
Oct. 07 2016