Adds the a new column to the datatable.

Syntax

Smartsite SXML CopyCode image Copy Code
datatable.columns.add(datatable dataTable, string columnName)
datatable.columns.add(datatable dataTable, string columnName, enum dataType)

Parameters

Name Data Type Description
dataTable DataTable The datatable to which a column will be added.
columnName String The name of the column that will be added.
dataType Enum The datatype of the column.
Enum values:
  • Undefined
    Not set
  • None
    Void (return type)
  • Array
    Array
  • String
    Default type
  • Any
    Generic object
  • Binary
    Binary data
  • Boolean
    Boolean
  • DataTable
    DataTable
  • DateTime
    Date/time
  • Float
    Floating point numeric data
  • Integer
    Integer
  • Locator
    Extended Uri
  • Enum
    Enumeration
  • Xml
    Xml data
  • ListOfStrings
    Default type
  • ListOfAny
    Generic object
  • ListOfBool
    Boolean
  • ListOfDateTime
    Date/time
  • ListOfFloat
    Floating point numeric data
  • ListOfInteger
    Integer
  • ListOfLocator
    Extended Uri

Return Value

None.

Expand image Example

SXML