cells()
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:
Name | Type | Optional | |
---|---|---|---|
1 | modifier | Yes - default: | |
Option used to specify how the cells should be ordered, and if paging or filtering in the table should be taken into account. |
Returns:
DataTables.Api
DataTables API instance with selected cells
cells( cellSelector [, modifier ] )
Select cells found by a cell selector
Parameters:
Name | Type | Optional | |
---|---|---|---|
1 | cellSelector | No | |
Cell selector. | |||
2 | modifier | Yes - default: | |
Option used to specify how the cells should be ordered, and if paging or filtering in the table should be taken into account. |
Returns:
DataTables.Api
DataTables API instance with selected cells
cells( rowSelector, columnSelector [, modifier ] )
Select cells found by both row and column selectors
Parameters:
Name | Type | Optional | |
---|---|---|---|
1 | rowSelector | No | |
Row selector, used to specify which rows the cells should be taken from. | |||
2 | columnSelector | No | |
Column selector, used to specify which columns the cells should be taken from. | |||
3 | modifier | Yes - default: | |
Option used to specify how the cells should be ordered, and if paging or filtering in the table should be taken into account. |
Returns:
DataTables.Api
DataTables API instance with selected cells
Related
The following options are directly related and may also be useful in your application development.