Promotic

RemoveRow - method of the PmaDataTable object

Description:
Removes a row (or more rows) on the specified position.
Existing rows after this position are moved.
Syntax:
Long RemoveRow(Long Row, [Long Count])
Parameters:
Row(Long) Number of the row from which the rows are to be removed.
The value >=0 means that it is the row index (zero-based index).
The value -2 means that Count rows has to be removed from the end of the table.
The value -3 means that all rows of the table are to be deleted.
Count[optional] (Long) The number of rows for remove.
The default value is 1.
Return value:
Returns the index of the first removed row.
It returns the negative number if an error occurred (the row has not been removed). In this case the error is written into the global errors of the INFO system.
Note:
"Read only" columns:
If at least one cell is locked in "Read only" column by writing non-empty value, then the whole structure of the table is locked. Then it is no longer possible to add or remove rows or columns or change the structure of the table. The structure and dimensions of the table must be defined and modified before writing first non-empty value into a cell in "Read only" column.
See also:
Example:
In the /DataTable object (of the PmaDataTable type) the following operations proceeds:
- The first row is removed (the row on the index 0)
- Five rows from the end of the table are removed
JavaScriptVBScriptSelect and copy to clipboard

var oDataTable = pMe.Pm("/DataTable");
oDataTable.RemoveRow(0);
oDataTable.RemoveRow(-2, 5);
PROMOTIC 9.0.27 SCADA system documentation MICROSYS, spol. s r.o.

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