How to disabling sorting
How to disabling sorting
pramuk97
Posts: 5Questions: 0Answers: 0
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]
[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]
This discussion has been closed.
Replies