row().selected()
Since: Select 1.4.0
Determine if a row has been selected.
Please note - this property requires the Select extension for DataTables.
Description
This method can be used to determine the selection state of an individual row.
Type
function row().selected()
- Description:
Determine if a row has been selected.
- Returns:
Selection flag indicator.
Example
Check if the first row in the table is selected or not:
var table = $('#myTable').DataTable();
if (table.row( ':eq(0)' ).selected()) {
console.log('Row is selected');
}
else {
console.log('Row is not selected');
}
Related
The following options are directly related and may also be useful in your application development.