Can't switch fetaures off

Can't switch fetaures off

richjohnstonerichjohnstone Posts: 7Questions: 2Answers: 0

Hi Allan,

I can't get this feature to work. I am trying to disable paging, length-change and info, here is my code:

var dTable;
$(document).ready(function(){
    dTable = $('#dTable').dataTable( {
        "paging":           false
        ,"lengthChange":    false
        ,"info":                    false
        ,"aaSorting":       [[ 1, "asc" ]]
    } ).addClass("Sortable");
    $(".row_header").css('background-color', '#a1a4a8');
});

the 'aaSorting' is definitely working but the three parameters above it are ignored. What am I doing wrong please?

Replies

  • allanallan Posts: 61,665Questions: 1Answers: 10,096 Site admin
    edited May 2014

    Can you please link to a test case. Your code seems to work just fine for me: http://live.datatables.net/bijoqev/1/edit. My guess (but it is only a guess without a test case) is that you are using an old version of DataTables. In which case use the legacy documentation.

    Allan

  • richjohnstonerichjohnstone Posts: 7Questions: 2Answers: 0

    Thanks for the prompt response Allan. We are using 1.9. have to think about updating now. Rich.

  • allanallan Posts: 61,665Questions: 1Answers: 10,096 Site admin

    That's the problem then - you are using 1.10 style option names. 1.9 doesn't know what to do with them so ignores them.

    You can still use 1.9, but it is no longer supported without a support contract.

    Allan

This discussion has been closed.