How to disabling sorting

How to disabling sorting

pramuk97pramuk97 Posts: 5Questions: 0Answers: 0
edited April 2014 in DataTables
I am using this code for making dataTable but the data is automatically sorting asc on the basis of 1st column.I want to stop that sorting and show data as I am getting in data
[code]
function MakeTrend(data) {
var aryJSONColTable = [];
for (var i = 0; i < data[0].length; i++) {
aryJSONColTable.push({

"sTitle": "apple",
"aTargets": [i],
"sClass": "center",
"fnRender": function (obj) {
var sReturn = obj.aData[obj.iDataColumn];

return sReturn;
}
});
};

oTable = $('#Tabletrend1').dataTable({
"sDom": "Trt",
"bDestroy": true,
"aoColumnDefs": aryJSONColTable,
"bProcessing": true,
"bLengthChange": true,
"sScrollX": "100%",
"sScrollXInner": "110%",
"bScrollCollapse": true,
"aaData": data
});

}
[/code]

Replies

  • tangerinetangerine Posts: 3,342Questions: 35Answers: 394
    http://datatables.net/forums/discussion/1121/turn-off-default-sort/p1
This discussion has been closed.