|
|
|
|
|
- Use conditions
- Multi-selection Table control
- Horizontal Table control
- Handling errors
<Table>.MoveLine (Function) In french: <Table>.DéplaceLigne Moves a row or swaps two rows in a Table control. To move the columns in a Table control, use <Table>.MoveColumn.
TABLE_Table1.DéplaceLigne(rowSelected, 5, amSwap)
TABLE_Table1.DéplaceLigne(rowSelected, 3, amMove)
TABLE_Table1.DéplaceLigne(rowSelected, amNext, amSwap)
Syntax
Moving to a specific position Hide the details
<Result> = <Table control>.MoveLine(<Index of row to move> , <Destination row index> [, <Operation to perform>])
<Result>: Integer New index of the row that was moved. <Table control>: Control name Name of the Table control to be used. <Index of row to move>: Integer Position of the row to move. This position must be between 1 and the number of rows in the Table control (returned by the <Table>.Count function or the Count property, for example).To move the row that is currently selected, use the rowSelected constant. <Destination row index>: Integer New row position. This position must be between 1 and the number of rows in the Table control (returned by the <Table>.Count function or the Count property, for example). 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 row position: | | amDisplayDestination | The moved (or swapped) row is displayed in the Table control. If necessary, the Table control is automatically scrolled to show the row at its new position. The selected row (selection bar) does not change. This constant can be combined with the amMove and amSwap constants.
| amMove (default value) | Moves the row to the index of the destination row. | amSwap | Swaps the position of the source and destination row. |
Remarks Multi-selection Table control If <Table>.MoveLine is used on a multi-selection Table control: - when row is moved (constant tdMoves): only the first row selected is moved.
- when exchanging lines (constant amSwap): only the first row will be exchanged.
- the rowSelected constant cannot be used. Otherwise, a fatal error occurs and no row is moved.
Handling errors Caution: <Table>.MoveLine function does not return an error code. To determine if this function has generated an error, use ErrorInfo with the errMessage constant.
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|