pMe | (Object) Reference to the PmgWTable object where the event rises. |
---|---|
pEvent | (Object) Reference to object describing detailed information about the specific event. pEvent.StartRow - (Long) Index of the first row for redrawing pEvent.EndRow - (Long) Index of the last row for the redrawing (including) pEvent.StartEmptyRow - (Long) Index of the first row that doesn't contain data for redrawing pEvent.EndEmptyRow - (Long) Index of the last row that doesn't contain data for redrawing (including) |
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.
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));
}
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 3000 rows stored in the PmaDatabase object that are changed by the time. The table was created apart the script of this event (e.g. oTable.cols=21, oTable.Rows=3001, oTable.FixedCols=0, oTable.FixedRows=1). The example fills up only those rows that haven't been filled up by data yet (rows between nStartEmptyRow, nEndEmptyRow); the table displays the data statically, it reads only those data that weren't viewed yet.
The row oTable.SetCellText index+1, 0 has the index increase by 1 because the table has in our case one fixed row reserved for column descriptions.
Dim index, oTable, oDb
Set oTable = pMe
Set oDb = pMe.Pm("/Database0")
If nStartEmptyRow > -1 Then
oDb.MoveTo nStartEmptyRow
For index = nStartEmptyRow To nEndEmptyRow
If Not oDb.IsEOF() Then
oTable.SetCellText index+1, 0, index
oTable.SetCellText index+1, 1, oDb.FieldValues(0)
oTable.SetCellText index+1, 2, oDb.FieldValues(1)
'...
oTable.SetCellText index+1, 21, oDb.FieldValues(20)
oDb.MoveNext
End If
Next
End If