{hero}

columns().names()

Since: DataTables 2.3.0

Get the names for the selected columns.

Description

This method provides the ability to retrieve the names of selected columns that has been set through the columns.name option.

This can be useful for the identification of columns, particularly when using orthogonal data, however, setting a column name does not functionally change the behaviour of a DataTable.

Type

columns().names()

Get the names that has been set for the selected columns (set via columns.name).

Returns:

DataTables.ApiAPI instance with the result set set to the names of the selected columns. Those values will be an empty string if a name was not set.

Related

The following options are directly related and may also be useful in your application development.