AddRow Method (DATATABLE)
10.5, PLBCMP GUI Only
The AddRow method inserts a new row into a DATATABLE. The method uses the following format:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Where:
label
Optional. A Program Execution Label.
object
Required. A DATATABLE object to which a row is added.
return
Optional. A Numeric Variable that returns the zero-based row number if successful or -1 if the method fails.
text
Required. A Character String Variable or literal that specifies text associated with the new row.
row
Optional. A Numeric Variable or decimal number that specifies the new row's zero-based number.
param
Optional. A Numeric Variable or decimal number that specifies the user-defined value associated with the new row.
checked
Optional. A Numeric Variable or decimal number that specifies the initial row checkbox state.
selected
Optional. A Numeric Variable or decimal number that specifies whether the row should initially be selected.
context
Optional. A Numeric Variable or decimal number that specifies the initial row context appearance.
stext
Optional. A Character String Variable or literal that specifies text assigned to a subitem in the new row.
Flags Affected: EOS, OVER, ZERO
Note the following:
The EOS flag is always cleared.
The ZERO flag is set if the {return} value is zero.
The OVER flag is set if the {return} variable is too small to receive the value.
If a {row} is not specified, the default value is zero (0) causing all rows to be pushed down.
If the DATATABLE is sorted ascending or descending, the data is sorted when the new row is added.
The row context type values are defined as follows:
|
Value |
Keyword |
|
0 |
$OC_DEFAULT |
|
1 |
$OC_DANGER |
|
2 |
$OC_DARK |
|
3 |
$OC_INFO |
|
4 |
$OC_LIGHT |
|
5 |
$OC_PRIMARY |
|
6 |
$OC_SECONDARY |
|
7 |
$OC_SUCCESS |
|
8 |
$OC_WARNING |
The ROWS collection allows direct access to a DATATABLE row using the GETPROP or SETPROP statements. The collection uses the following format:
Where:
Example for DATATABLE Row properties using the ROWS collection:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| ||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| ||
|
|
|
|
|
| ||
|
|
|
|
|
| ||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
See Also: Method Syntax, DATATABLE Methods
![]() |