Columns
Column Class
Property | Type | Description |
DataType | string | The data type for the column. Standard values include |
Format | string | function | The formatting to be used for values in the column. Valid values are C[N], P[N], N[N] where [N] is the number of decimal places. Use |
Name | string | The system name of the column. This is often times the name of the source field used in the data service. |
Title | string | The descriptive name of the column. This will often times be used as the label for values in UI components. |
Column Methods
Name | Description |
columnNameArray | Returns an array of the |
columnTitleArray | Returns an array of the |
getColumn(name) | Returns the column with the column |
removeColumn(name) | Removes the column |
renameColumn(oldName, newName) | Changes the name of the column from |
AddColumn Methods
Use the following methods with the addColumn
method to create a new column.
Name | Description |
addColumn(name) | Adds a new column with the |
calc | Creates the new column as a calculated column. Note, as new rows are added or removed, this calculation will be dynamically re-applied. Visit Working with DataTables Select and Calculate for examples. |
format(format) | Format the new column using the specification in |
index | Creates a calculated column that sets each row to the index position of the row within all rows in the data table. Note, as new rows are added or removed, this calculation will be dynamically re-applied. |
title(title) | Sets the |
type(type) | Sets the |
value(value) | Sets the value for all rows in the data table to |
The following creates a new column on a data table calledemp_position
with a display title of Position
.
Visit Working with DataTables Columns for detailed examples of using column data table methods.
Last updated