selecting a row
selecting a row
I am having trouble trying to select a row. Here is my code.
The table loads, and functions ie pages, filters and sorts.
$(document).ready(function() {
$('#example').dataTable().fnDestroy();
oTable = $('#example').dataTable( {
"bProcessing": true,
"sAjaxSource": "/cfc/datatable2.cfc?method=mydata&returnformat=json",
"sAjaxDataProp": "DATA",
fnRowCallback": function( nRow, DATA, iDisplayIndex ) {
if ( jQuery.inArray(DATA[0], aSelected) !== -1 ) {
$(nRow).addClass('row_selected');
}
});
} );
The table loads, and functions ie pages, filters and sorts.
$(document).ready(function() {
$('#example').dataTable().fnDestroy();
oTable = $('#example').dataTable( {
"bProcessing": true,
"sAjaxSource": "/cfc/datatable2.cfc?method=mydata&returnformat=json",
"sAjaxDataProp": "DATA",
fnRowCallback": function( nRow, DATA, iDisplayIndex ) {
if ( jQuery.inArray(DATA[0], aSelected) !== -1 ) {
$(nRow).addClass('row_selected');
}
});
} );
This discussion has been closed.