{hero}

cell().selected()

Since: Select 1.4.0

Determine if a cell has been selected.
Please note - this property requires the Select extension for DataTables.

Description

This method can be used to determine the selection state of an individual cell.

Type

function cell().selected()

Description:

Determine if a cell has been selected.

Returns:

Selection flag indicator.

Example

Check if the first cell in the table is selected or not:

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

if (table.cell(':eq(0)', 0).selected()) {
	console.log('Cell is selected');
}
else {
	console.log('Cell is not selected');
}

Related

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