disable pagination on a custom table

disable pagination on a custom table

kalzkalz Posts: 5Questions: 0Answers: 0
edited March 2013 in General
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]

Replies

  • allanallan Posts: 63,516Questions: 1Answers: 10,472 Site admin
    To disable pagination use `bPaginate : false` ( bPaginate ), not bSortable.

    [code]
    $('#example').dataTable( {
    "bPaginate": false
    } );
    [/code]

    Allan
  • kalzkalz Posts: 5Questions: 0Answers: 0
    Thanks 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.
This discussion has been closed.