bPaginate: false is ignored
bPaginate: false is ignored
brandonb
Posts: 1Questions: 0Answers: 0
I am using DataTables with the row_details feature. Due to the framework I am working in, there's a call to the file near the bottom of the page:
[code][/code]
... and then after that, there's code to set up the row_details feature.
For some reason, the expand/collapse buttons for row_details only appears on the first "page", and if I go to subsequent pages, the columns and data are mis-matched. I tried sending bPaginate: false, but the table is still paginated.
I would like for one of two things to happen:
- no more pagination
- the row_details aspect works across all "pages"
Here is the code to set up the row_details feature, nearly verbatim from http://datatables.net/examples/api/row_details.html:
[code]function fnFormatDetails ( oTable, nTr )
{
var aData = oTable.fnGetData( nTr );
var upsData = aData[4];
/* snipped ... code to set up data*/
var sOut = '';
sOut += ''+upsData+'';
sOut += '';
return sOut;
}
$(document).ready(function() {
/*
* Initialse DataTables, with no sorting on the 'details' column
*/
var oTable = $('#rrInvoice').dataTable( {
"aoColumnDefs": [
{ "bSortable": false, "aTargets": [ 0 ] }
],
"aaSorting": [[1, 'asc']],
"bPaginate": false,
"bFilter" : false,
"bDestroy": true,
"bRetrieve": true
});
/* snipped ... code to insert the "details" column, event listener for opening and closing details */
} );[/code]
[code][/code]
... and then after that, there's code to set up the row_details feature.
For some reason, the expand/collapse buttons for row_details only appears on the first "page", and if I go to subsequent pages, the columns and data are mis-matched. I tried sending bPaginate: false, but the table is still paginated.
I would like for one of two things to happen:
- no more pagination
- the row_details aspect works across all "pages"
Here is the code to set up the row_details feature, nearly verbatim from http://datatables.net/examples/api/row_details.html:
[code]function fnFormatDetails ( oTable, nTr )
{
var aData = oTable.fnGetData( nTr );
var upsData = aData[4];
/* snipped ... code to set up data*/
var sOut = '';
sOut += ''+upsData+'';
sOut += '';
return sOut;
}
$(document).ready(function() {
/*
* Initialse DataTables, with no sorting on the 'details' column
*/
var oTable = $('#rrInvoice').dataTable( {
"aoColumnDefs": [
{ "bSortable": false, "aTargets": [ 0 ] }
],
"aaSorting": [[1, 'asc']],
"bPaginate": false,
"bFilter" : false,
"bDestroy": true,
"bRetrieve": true
});
/* snipped ... code to insert the "details" column, event listener for opening and closing details */
} );[/code]
This discussion has been closed.
Replies
> - the row_details aspect works across all "pages"
See the top FAQ: http://datatables.net/faqs#events :-)
Allan