oColReorder with aiOrder option not reordering table data

oColReorder with aiOrder option not reordering table data

neezerneezer Posts: 2Questions: 0Answers: 0
edited March 2013 in Plug-ins
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

Replies

  • neezerneezer Posts: 2Questions: 0Answers: 0
    Sorry, i meant-

    [code] "oColReorder": {
    "aiOrder": [0,1,2,5,4,3] [/code]
This discussion has been closed.