disable pagination on a custom table
disable pagination on a custom table
Hi I have a table with a 2nd column with date format (dd/mm/yyyy hh:mm:ss am/pm).I only want to allow sorting by date on the table.Everything is working as expected.I would like to disable pagination on the table.Where should I add the code "bSortable":false ? I have tried a few things but it is not working as expected.Having problems getting the syntax right I am using the following js code in the header:
[code]
$(document).ready( function() { $('#gradientstyle').dataTable( {"aoColumns": [{ "bSortable": false },null,{"bSortable": false },{"bSortable": false },{ "bSortable": false }] } );} );
[/code]
and the following code before closing the html body.
[code]
$(document).ready(function () {$('#gradientstyle').dataTable({aoColumnDefs: [{ "sType": "datetime-au", "aTargets": [1] }]
[/code]
[code]
$(document).ready( function() { $('#gradientstyle').dataTable( {"aoColumns": [{ "bSortable": false },null,{"bSortable": false },{"bSortable": false },{ "bSortable": false }] } );} );
[/code]
and the following code before closing the html body.
[code]
$(document).ready(function () {$('#gradientstyle').dataTable({aoColumnDefs: [{ "sType": "datetime-au", "aTargets": [1] }]
[/code]
This discussion has been closed.
Replies
[code]
$('#example').dataTable( {
"bPaginate": false
} );
[/code]
Allan
Sorry for the late reply as I was away for some time.Silly on my part should have checked before.Thanks, that was what I was looking for.