Disable sorting

Disable sorting

venkatsvenkats Posts: 6Questions: 3Answers: 0

Hi,
How to disable sorting for datatable. Currently, I am invoking the datatable as below:
$('#tbl1').dataTable({ "pagingType": "full_numbers" });
I do not want the sorting feature, but require paging.
How to achieve it?
Thanks

Answers

  • shickeyshickey Posts: 18Questions: 1Answers: 0
    edited May 2014

    You want to add "ordering": false to your initialization. See ordering.

    Example

    If you only want to disable it for certain columns, see columnDefs.targets.

  • venkatsvenkats Posts: 6Questions: 3Answers: 0

    I added bSort:false. Is this correct?
    $('#tbl1').dataTable({ "pagingType": "full_numbers", "bSort": false });

  • tangerinetangerine Posts: 3,365Questions: 39Answers: 395

    shickey said:

    You want to add "ordering": false to your initialization.

This discussion has been closed.