Promotic
WikipediaLinkedInYoutubeTwitterFacebook

InsertRow - method of the PmfTable object

Description:
Inserting one or more new rows.
Syntax:
Empty InsertRow(Long nRowArea, Long iRow, [Long nCount])
Calling:
object.InsertRow(nRowArea, iRow[, nCount])
Parameters:
nRowArea(Long) Detecting the area of the table (see Areas in the table).

At this moment only the value 1 can be entered = table data area (Body). It means adding into the header area (Head) and footer (Foot) is not possible (it can only be set during the initialization phase by the InitRows method).

iRow(Long) Row index (zero-based index).

-1 = insert to the end.

nCount[optional] (Long) Number of rows (default: 1).
Note:
This method is also functional in Web panels.
See also:
Example1:
Inserts a new row to the selected row of the table (only for "row" mode) and writes a text to the first column of this row.
JavaScriptSelect and copy to clipboard

var oTable = pMe.Items("/Form").Form.GetItem("idTable");
var oTabArea = oTable.GetArea(11);

var iRow = oTable.GetSel(0).Row;
oTable.InsertRow(1, iRow);
var oRow = oTabArea.GetRow(iRow);
oRow.GetCell(0).Value = "Text InsertRow";

History:
Pm9.00.04: Created
PROMOTIC 9.0.12 SCADA system documentation - MICROSYS, spol. s r.o.

Send page remarkContact responsible person
© MICROSYS, spol. s r. o.Tavičská 845/21 703 00 Ostrava-Vítkovice