PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Use conditions
  • Multi-selection Table control
  • Horizontal Table control
  • Managing errors
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 row or swaps two rows in a Table control. To move the columns in a Table control, use TableMoveColumn.
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 - Browser code This function is now available in Browser code for the Browser Table controls.
New in version 19
WEBDEV - Browser code This function is now available in Browser code for the Browser Table controls.
WEBDEV - Browser code This function is now available in Browser code for the Browser Table controls.
Versions 20 and later
Android This function is now available for the Android applications.
iPhone/iPad This function is now available for the iPhone/iPad applications.
New in version 20
Android This function is now available for the Android applications.
iPhone/iPad This function is now available for the iPhone/iPad applications.
Android This function is now available for the Android applications.
iPhone/iPad This function is now available for the iPhone/iPad applications.
Example
// Swaps the current row and row 5
TableMoveLine(TABLE_Table1, rowSelected, 5, amSwap)
// Moves the current row to row 3
TableMoveLine(TABLE_Table1, rowSelected, 3, amMove)
// Swaps the current line with the next line
TableMoveLine(TABLE_Table1, rowSelected, amNext, amSwap)
Syntax

Move to a specific position Hide the details

<Result> = TableMoveLine(<Table Control> , <Subscript of Row to Move> , <Subscript of Destination Row> [, <Operation to Perform>])
<Result>: Integer
New subscript of row that was moved.
<Table Control>: Control name
Name of 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 of Row to Move>: Integer
Position of row to move. This position must be included between 1 and the number of rows found in the Table control (returned by TableCount or ..Occurrence).
To move the row that is currently selected, use the rowSelected constant.
<Subscript of Destination Row>: Integer
New row position. This position must be included between 1 and the number of rows found in the Table control (returned by TableCount or by ..Occurrence). A fatal error occurs if this parameter is not valid.
To handle the row that is currently selected, use the rowSelected constant.
<Operation to Perform>: Optional Integer constant (or combination of constants)
Change of position that will be performed for the row:
amDisplayDestinationThe modified row is displayed in the Table control. An automatic scroll of the rows is performed if necessary to display the modified row in the Table control. The selected row (selection bar) is not modified.
This constant can be combined with the amMove and amSwap constants.
WEBDEV - Server codePHP Ajax table: The modified row will always be displayed at the top of Table control.
amMove
(default value)
The row is moved toward the subscript of destination row.
amSwapThe source row and the destination row are swapped.
WINDEVWEBDEV - Server codeAndroidiPhone/iPadWindows MobileJavaPHPAjaxUser code (UMC)

Move relative to the current position Hide the details

<Result> = TableMoveLine(<Table Control> , <Subscript of Row to Move> , <Relative Move> [, <Operation to Perform>])
<Result>: Integer
New subscript of row that was moved.
<Table Control>: Control name
Name of 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 of Row to Move>: Integer
Position of row to move. This position must be included between 1 and the number of rows found in the Table control (returned by TableCount or ..Occurrence for example).
To handle the row that is currently selected, use the rowSelected constant.
<Relative Move>: Integer constant
Used to perform a move or a swap on a position relative to the subscript of row to move.
amLastMoves the row to last position.
amPreviousPageMoves the row one page to the top (a page corresponds to the number of rows that can be simultaneously displayed in the Table control).
amNextPageMoves the row one page to the bottom (a page corresponds to the number of rows that can be simultaneously displayed in the Table control).
amPreviousMoves the row one position to the top.
amFirstMoves the row to first position.
amNextMoves the row one position to the bottom.

If this parameter is invalid (amPrevious constant used on the first row of the Table control for example), the row is moved "to the nearest" position.
<Operation to Perform>: Optional Integer constant (or combination of constants)
Change of position that will be performed for the row:
amDisplayDestinationThe modified row is displayed in the Table control. An automatic scroll of the rows is performed if necessary to display the modified row in the Table control. The selected row (selection bar) is not modified.
This constant can be combined with the amMove and amSwap constants.
WEBDEV - Server codePHP Ajax table: The modified row will always be displayed at the top of Table control.
amMove
(default value)
The row is moved toward the subscript of destination row.
amSwapThe source row and the destination row are swapped.
Remarks

Use conditions

TableMoveLine can be used on:
  • a memory Table control.
  • a browsing Table control loaded in memory.
  • WINDEVReports and QueriesWindows MobileJavaUser code (UMC) an horizontal Table control.
  • WEBDEV - Server codePHP an Ajax Table control or a Classic Table control.
  • WEBDEV - Browser code a Browser Table control.
This function cannot be used on the TreeView Table controls and on the browsing Table controls (direct access).
Notes: Moving row according to the type of control:

Multi-selection Table control

If TableMoveLine is used on a multi-selection Table control:
  • when moving a row (amMove constant): only the first selected row will be moved.
  • when swapping rows (amSwap constant): only the first row will be swapped.
  • the rowSelected constant cannot be used. Otherwise, a fatal error occurs and no row is moved.
WINDEVReports and QueriesWindows MobileJavaUser code (UMC)

Horizontal Table control

If TableMoveLine is used on an horizontal Table control, the elements moved will be the columns.
To move the rows in an horizontal Table control, use TableMoveColumn.

Managing errors

Caution: TableMoveLine returns no error code. To find out whether an error was generated by this function, use ErrorInfo associated with the errMessage constant.
WEBDEV - Browser code ErrorInfo is not available.
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
Android wd230android.jar
Minimum required version
  • Version 14
This page is also available for…
Comments
Click [Add] to post a comment