{hero}

cell().select()

Since: Select 1.0.0

Select a single cell.
Please note - this property requires the Select extension for DataTables.

Description

This method simply selects a single cell that has been found by the cell() selector method.

If the selection style (select.style / select.style()) is set to single any previously selected cells will be automatically deselected. Otherwise the cell will be added to the current selected set.

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

Type

function cell().select()

Description:

Select a single cell in the table, based on the cell found by the cell() method.

Returns:

API instance that contains a reference to the selected cell.

Example

Select all cells in the first row on the current page:

var table = new DataTable('#myTable');

table.cell(':eq(0)', null, { page: 'current' }).select();

Related

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