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
|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)
This event is not
functional yet for Web panels
It allows among others to read dynamically the table content depending on the scrollbar position; parameters nStartRow
say which rows to draw and parameters nStartEmptyRow
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
) by the current data or fill up only those rows that weren't filled up by the data (i.e. rows between nStartEmptyRow
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
), 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 oTable = pMe;
for (index = nStartRow; index <= nEndRow; index++)
oTable.SetCellText(index, 0, index);
oTable.SetCellText(index, 1, Pm.Round(Pm.Random(0, 100), 1));