Sorting class is changed on first redraw on the column with fixed sorting

Sorting class is changed on first redraw on the column with fixed sorting

jocapcjocapc Posts: 45Questions: 0Answers: 0
edited February 2012 in DataTables 1.9
Hi,

I want to setup fixed asc sorting on the first column of the table and to disable sorting on other columns. This is done AFTER DataTables initialization because I'm trying to create a new add on for datatable. Code looks like:

[code]
var oTable = $("#example").dataTable();
....


var aaSortingFixed = (oTable.fnSettings().aaSortingFixed==null?new Array():oTable.fnSettings().aaSortingFixed);
aaSortingFixed.push([properties.iIndexColumn, "asc"]);

oTable.fnSettings().aaSortingFixed = aaSortingFixed;

for(var i=0; i

Replies

  • jocapcjocapc Posts: 45Questions: 0Answers: 0
    I have fixed this problem.
    After this code section I have explicitly called oTable.fnDraw()

    Jovan
This discussion has been closed.