rows().select()
Select rows.
Please note - this property requires the Select extension for DataTables.
Description
This method simply selects the rows that have been found by the rows()
selector method.
Selected rows can later be retrieved using the selected
extension to the selector-modifier
object - for example table.rows( { selected: true } ).data()
will get the data of all rows which are selected in the table.
Type
function rows().select()
- Description:
Select one or more rows in the table, based on the rows found by the
rows()
method.- Returns:
API instance that contains a reference to the selected rows.
Example
Select all rows which have a class of 'important':
var table = new DataTable('#myTable');
table.rows('.important').select();
Related
The following options are directly related and may also be useful in your application development.