columns().select()

Since: Select 1.0.0

Select columns. Please note - this property requires the Select extension for DataTables.

Description

This method simply selects the columns that have been found by the columns() selector method.

Selected columns can later be retrieved using the selected extension to the selector-modifier object - for example table.columns( { selected: true } ).data() will get the data of all columns which are selected in the table.

Type

function columns().select()

Description:

Select one or more columns in the table, based on the columns found by the columns() method.

Returns:

API instance that contains a reference to the selected columns.

Example

Select column indexes 1 and 2:

var table = $('#myTable').DataTable();

table.columns([1, 2]).select();

Related

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