{hero}

cells()

Since: DataTables 1.10

Select multiple cells from a table.

Description

This method provides the ability to select multiple cells to work with in a DataTable, with its chained methods providing the ability to get the data from the cell, the nodes and to invalidate the data, among other actions.

While cell() provides access to single cells, this cells() method is used to allow multiple cells to be manipulated or modified at the same time.

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

  • All cells (no parameters, or just a selector-modifier option)
  • Cell selector
  • Cross product between row and column selectors

Types

cells( [ modifier ] )

Select all cells

Parameters:

Returns:

DataTables.ApiDataTables API instance with selected cells

cells( cellSelector [, modifier ] )

Select cells found by a cell selector

Parameters:

Returns:

DataTables.ApiDataTables API instance with selected cells

cells( rowSelector, columnSelector [, modifier ] )

Select cells found by both row and column selectors

Parameters:

Returns:

DataTables.ApiDataTables API instance with selected cells

Related

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