onDataUpdate - event of the PmgWTable object

The event is triggered on each request for redrawing (e.g. each dragging the scrollbar and each calling the Draw method).
pMe(Object) Reference to the PmgWTable object where the event rises.
pEvent(Object) Reference to the object describing detailed information about the specific event.
pEvent.StartRow - (Long) [for reading] Index of the first row for redrawing
pEvent.EndRow - (Long) [for reading] Index of the last row for the redrawing (including)
pEvent.StartEmptyRow - (Long) [for reading] Index of the first row that doesn't contain data for redrawing
pEvent.EndEmptyRow - (Long) [for reading] Index of the last row that doesn't contain data for redrawing (including)
This event is not functional yet in the Web panel.

It allows among others to read dynamically the table content depending on the scrollbar position; nStartRow, nEndRow parameters say which rows to draw and nStartEmptyRow, nEndEmptyRow parameters say which data of these rows weren't filled up. Thus it is possible in this event either to always fill up all rows (i.e. rows between nStartRow and nEndRow) by the current data or fill up only those rows that weren't filled up by the data (i.e. rows between nStartEmptyRow and nEndEmptyRow).
Let's have an example written in the script of this event.
In the pMe parameter there is a reference to the PmgWTable object. Let's have 300 variables stored in the PmaData object whose current values are changed, for example, every 20 seconds. The table was created apart the script of this event (e.g. oTable.cols=2, oTable.Rows=301, oTable.FixedCols=0, oTable.FixedRows=1). The example always fills up all required rows for redrawing (rows between nStartRow, nEndRow), the table displays always the current data.
The row oTable.SetCellText index+1, 0 has the index increased by 1 because the table has in our case one fixed row reserved for column descriptions.
JavaScriptVBScriptSelect and copy to clipboard

var index;
var oTable = pMe;
for (index = nStartRow; index <= nEndRow; index++)
oTable.SetCellText(index, 0, index);
oTable.SetCellText(index, 1, Pm.Round(Pm.Random(0, 100), 1));
PROMOTIC 9.0.27 SCADA system documentation MICROSYS, spol. s r.o.

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