Get / set the items that Select will select based on user interaction (rows, columns or cells). Please note - this property requires the Select extension for DataTables.
Select provides the option for end users to be able to select rows, columns or cells in a table (i.e. the table's items). This method can be used to dynamically set which item will be selected if the end user is permitted to select items in the table (see the
select.style() option and method).
Please note that setting this option effects only the end user interaction with the table. It is still possible to select other items via the API (e.g. if the items are set to select cells, you can still use
rows().select() to select a row).
Get the items that will be selected by user interaction (i.e. a click on the table).
The current item that will be selected when the user interacts with Select's event listeners - this will be the value
function select.items( set )
Set the item type that will be selected by user interaction.
Name Type Optional 1
Items to select - this must be one of
DataTables API instance for chaining.
Let the user select cells by clicking on them:
var table = $('#myTable').DataTable(); table.select.style( 'os' ); table.select.items( 'cells' );
The following options are directly related and may also be useful in your application development.