how to set the default sort by column

how to set the default sort by column

SkyScreamSkyScream Posts: 22Questions: 1Answers: 0

I have a result of pure JSON that datatables is pulling. The first record on the results is not showing up as the first result in the table. here is my datatables code.

 $('#resulttable').dataTable( {
        destroy: true,
        "ajax": {
    "url": "../includes/views/DetailsTableJSON.php",
    "type":"post",
    "data": {
    "cid" : <?php echo $GBAA->company_id; ?>,
    "ctype" : $("#ctype").val(),
    "dateF" : $("#datepickerF").val(),
    "dateS" : $("#datepickerS").val(),
    "sortb" : x,
    "sel" : y,
    "add" : z
}}

} ); 

Surely Datatables is rearranging the records. How do I set the arrangement to reflect exactly as the JSON array reflects when it loads?

Replies

This discussion has been closed.