Promotic

MoveRow - method of the PmfTable object

Description:
Moves the table row to the specified position.
Syntax:
Long MoveRow(Long nArea, Variant vSrcRow, Variant vDstRow)
Parameters:
nArea(Long) Detecting the area of the table (see Areas in the table).
So far only the value 1 = data area of the table (Body) can be entered. Moving a row in the header (Head) or footer (Foot) of a table is not yet possible.
vSrcRow(Variant) The starting position (source). Specifies the position of the row to be moved. For now, it is always a row index (zero-based index).
vDstRow(Variant) The target position (destination). Specifies the position to which the row will be moved. For now, it is always a row index (zero-based index).
Return values:
-1 - An error occurred while moving, the row was not moved (e.g. wrong source or destination position was entered).
0 - There was no error while moving, but the row was not moved (e.g. the same source and destination position was specified).
1 - The row has been moved to the specified position.
Note:
This method is also functional in Web panels.
See also:
Example1:
JavaScriptSelect and copy to clipboard

oTable.MoveRow(1, 2, 8);   // Moves the row from position 2 to position 8
Example2:
JavaScriptSelect and copy to clipboard

var oSel = oTable.GetSel(0);
if (Pm.IsValid(oSel))
{
var iSelRow = oSel.Row;
oTable.MoveRow(1, iSelRow, iSelRow+1);   // Moves the selected row one position down
}

History:
Pm9.00.25: Created
PROMOTIC 9.0.25 SCADA system documentation MICROSYS, spol. s r.o.

Send page remarkContact responsible person
© MICROSYS, spol. s r. o.