AddColumn Method (DATATABLE)
10.5, PLBCMP GUI Only
The AddColumn method inserts a new column into a DATATABLE. The method uses the following format:
|
|
|
|
|
|
|
|
|
|
|
|
Where:
label
Optional. A Program Execution Label.
object
Required. A DATATABLE object to which a column is added.
return
Optional. A Numeric Variable that returns the zero-based column number if successful or -1 if the method fails.
position
Required. A Numeric Variable or decimal number that specifies the zero-based new column position.
type
Optional. A Numeric Variable or decimal number that specifies the type of data stored in the column.
id
Optional. A Character String Variable or literal that specifies identification name assigned to the new column.
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.
The column content type values are defined as follows:
|
Value |
Keyword |
Description |
|
0 |
$TC_DEFAULT |
DefaultT |
|
1 |
$TC_HIDDEN |
Hidden |
|
2 |
$TC_EDITABLE |
Editable LISTVIEW mode |
|
3 |
$TC_TITLE |
Title |
|
4 |
$TC_DETAILS |
Details |
|
5 |
$TC_IMAGE |
Image |
|
6 |
$TC_HEADER |
Header |
|
7 |
$TC_FOOTER |
Footer |
|
8 |
$TC_BUTTON1 |
Button 1 |
|
9 |
$TC_BUTTON2 |
Button 2 |
|
10 |
$TC_BUTTON3 |
Button 3 |
|
11 |
$TC_START |
Start Time |
|
12 |
$TC_END |
End Time |
|
13 |
$TC_GPS |
GPS Address |
The COLUMNS collection allows access to a DATATABLE column using the GETPROP or SETPROP statements. The collection uses the following format:
Where:
Example for DATATABLE Column properties using the COLUMNS collection:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| ||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
See Also: Method Syntax, DATATABLE Methods
![]() |