oColReorder with aiOrder option not reordering table data
oColReorder with aiOrder option not reordering table data
Hi,
Datatables is awesome!
I am facing an issue with reordering columns though. I wanted to predefine a column order for the table.
But only the table headers get reordered according to the indexes specified in "aiOrder".
I make an AJAX call which returns a csv file and use fnAddData to add the rows to the datatable.
I have placed the code for reordering the columns after the AJAX call and aoColumns:
[code]
$(document).ready(function(){
$.ajax({
type: "GET",
url: "/abc",
dataType: "text",
success: function(data){
var records=$.csv.toArrays(data);
for(i=1; i
Datatables is awesome!
I am facing an issue with reordering columns though. I wanted to predefine a column order for the table.
But only the table headers get reordered according to the indexes specified in "aiOrder".
I make an AJAX call which returns a csv file and use fnAddData to add the rows to the datatable.
I have placed the code for reordering the columns after the AJAX call and aoColumns:
[code]
$(document).ready(function(){
$.ajax({
type: "GET",
url: "/abc",
dataType: "text",
success: function(data){
var records=$.csv.toArrays(data);
for(i=1; i
This discussion has been closed.
Replies
[code] "oColReorder": {
"aiOrder": [0,1,2,5,4,3] [/code]