WireBootstrap
HomeDocsBuySupport
  • Introduction
  • Overview
  • Getting Started
  • Installation
  • Connecting to Data
    • Data Connectors
      • SQL Data
      • Custom Web Services
      • Local Data
      • Other Sources
    • Data Sources
    • Discovery
    • Building a Data Connector
  • Working With Queries
    • Select Queries
      • Query Extensions
    • Stored Procedures
    • Custom Web Services
    • Executing Queries
    • ORM
  • Writing Data
  • Updates
  • Deletes
  • Working with DataTables
    • Introduction
    • Filter and Sort
    • Select and Calculate
    • Joins
    • Rows
    • Columns
  • Working with DataSets
  • Introduction
  • Executing Queries
  • Transforms
  • Writing Data
  • Data Events
  • Working with Components
    • Introduction
    • Encapsulation
    • Configuration
      • Data
      • Events
      • Observables
      • Validation
      • Display
      • Vendor
      • Custom
    • Component
    • Web Frameworks
    • Building a Component
      • Hello World
      • Data Events
      • DataSets
  • Working With Data Events
    • Introduction
    • Event Basics
    • Event Data
    • Event Actions
  • Working with Themes
    • Introduction
    • Sample Data
    • Libraries
    • Pages
    • Building a Theme Project
  • Utilities
    • Formatting
    • Expressions
    • Collections
    • Spinners
    • Copy and Merge
    • Validation
    • Loading Assets
    • Service Calls
    • Download Files
    • Browser Location
    • Types
    • Promise
  • Reference
    • wire
      • wire.Collection
      • wire.download
      • wire.validate
    • wire.data
      • wire.data.DataEvent
      • wire.data.DataModel
      • wire.data.DataPromise
      • wire.data.DataSet
      • wire.data.DataSource
      • wire.data.DataTable
        • Columns
        • Rows
      • wire.data.StoredProcedure
      • wire.data.TableQuery
    • wire.ui
      • wire.ui.Component
      • wire.ui.validate
Powered by GitBook
On this page
  • Column Class
  • Column Methods
  • AddColumn Methods

Was this helpful?

  1. Reference
  2. wire.data
  3. wire.data.DataTable

Columns

Column Class

Property

Type

Description

DataType

string

The data type for the column. Standard values include string, number, boolean, guid, html. Depending on the data service, this may also be a custom value.

Format

string | function

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 Name for each column in a data table.

columnTitleArray

Returns an array of the Title for each column in a data table.

getColumn(name)

Returns the column with the column name.

removeColumn(name)

Removes the column name from a data table.

renameColumn(oldName, newName)

Changes the name of the column from oldName to newName. This will also change the property with the same name on all rows in the data table.

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 Name property set to name.

calc

format(format)

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 Title property of the new column.

type(type)

Sets the DataType property of the new column.

value(value)

Sets the value for all rows in the data table to value for the new column.

The following creates a new column on a data table calledemp_position with a display title of Position.

...

table.addColumn("emp_position").title("Position");
Previouswire.data.DataTableNextRows

Last updated 4 years ago

Was this helpful?

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 C for currency, P for percentage, and N to use numeric thousands separators. A custom function can also be used to format values. Visit for examples.

Creates the new column as a calculated column. Note, as new rows are added or removed, this calculation will be dynamically re-applied. Visit for examples.

Format the new column using the specification in format. This can also be a custom function. See the property of the Column class above for details.

Visit for detailed examples of using column data table methods.

Working with DataTables Columns
Format
Working with DataTables Select and Calculate
Working with DataTables Select and Calculate