aaSorting Not Disabled

aaSorting Not Disabled

msruby64msruby64 Posts: 4Questions: 0Answers: 0
edited October 2012 in General
Hi, I've been using DataTables 1.7 for a while and just downloaded 1.9.4 and set up DataTables to user server side computation (bServerSide: true) for the first time. I've also set aaSorting: [] so that DataTables will NOT do an initial sort. However, I see that DataTables is calling the PHP server side script just after the table loads and updating the table. I haven't used servers side processing prior to this, so I don't know if it's an issue with 1.9.4 or something else that I'm doing wrong.

Thanks for the great program.

Mitchell

Replies

  • msruby64msruby64 Posts: 4Questions: 0Answers: 0
    Just realized I forgot to add the set up code.

    if ($("#table-documents").length > 0)
    {
    $("#table-documents").dataTable( {
    "sPaginationType": "full_numbers",
    "aaSorting": [], // Don't do initial sort
    "bAutoWidth": false,
    "bStateSave": false,
    "iDisplayLength": 25,
    "bProcessing": true,
    "bServerSide": true,

    "sAjaxSource": "../datatables_server.php",

    "bSortClasses": false,

    "sDom": 'iflrtp',
    "oLanguage":
    {
    'sLengthMenu': 'Show ' + rows_to_show + ' rows'
    },

    "aoColumns": [
    { "bSortable": false, "bSearchable": false },
    { "sType": 'string' },
    { "sType": 'string' },
    { "sType": 'string' },
    { "sType": 'numeric', "bSearchable": false },
    { "sType": 'numeric', "bSearchable": false },
    { "sType": 'numeric', "bSearchable": false },
    { "sType": 'numeric' }
    ]
    });
    }
This discussion has been closed.