Quantcast
Channel: DataTables 1.9 — DataTables forums
Viewing all articles
Browse latest Browse all 1816

Selected Row datatables does not work

$
0
0
Hello,

I am trying to add the functionality in my table to be able to select single rows and highlight the one selected.

I am using the following code but it seems that nothing happens, when I click on any row it does nothing, it does not add the class that I have specified.

This is the code:

$(document).ready(function(){
var $objTable = $('#dataTableCustomerSearch').dataTable({
'bJQueryUI' : true,
'bFilter' : true,
'bPaginate' : false,
'bInfo' : true,
'sScrollY': '250px',
'bScrollCollapse': true,
'bSort' : true,
'bAutoWidth' : false,
'oLanguage' : {
'sLengthMenu' : 'Show _MENU_ Entries',
'sEmptyTable' : 'No Entries',
'sZeroRecords': 'No Entries Found',
'sInfo' : 'Search Results: _TOTAL_ customers'
},
'sDom': 'T<"top"i>rt',
'oTableTools': {
'sSelectedClass': 'selectedRow',
'sRowSelect': 'single'
},

'aoColumnDefs': [
{ 'aTargets': [0], 'bSortable': true, 'bSearchable': true },
{ 'aTargets': [1], 'bSortable': true, 'bSearchable': true },
{ 'aTargets': [2], 'bSortable': true, 'bSearchable': true },
{ 'aTargets': [3], 'bSortable': true, 'bSearchable': true },
{ 'aTargets': [4], 'bSortable': true, 'bSearchable': true }
]
});


Can anyone tell me whether they had the same issue and how to solve it?

Thank you very much in advance.

Regards

Viewing all articles
Browse latest Browse all 1816

Trending Articles