{hero}

cell()

Since: DataTables 1.10

Select a single cell from a table.

Description

Select an individual cell to work with from a DataTable, with its chained methods providing the ability to get / set the data in the cell, work with it node directly and other actions.

Note that this method selects a single cell. If the selectors provided resolve to multiple cells in this method, the result will be truncated to just a single cell - the first one found. If you need to work with multiple cells, the cells() method is available with the same selection options.

The method has two forms, reflecting the fact the cells can be selected in multiple different ways as your implementation demands:

  • Cell selector
  • Cross product between row and column selectors

Types

function cell( [ modifier ] )

Description:

Select a cell that matches the modifier

Parameters:
Returns:

DataTables API instance with selected cell

function cell( cellSelector, [ modifier ] )

Description:

Select the cell found by a cell selector

Parameters:
Returns:

DataTables API instance with selected cell

function cell( rowSelector, columnSelector, [ modifier ] )

Description:

Select the cell found from both row and column selectors

Parameters:
Returns:

DataTables API instance with selected cell

Related

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