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
jocapc
Posts: 45Questions: 0Answers: 0
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
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
This discussion has been closed.
Replies
After this code section I have explicitly called oTable.fnDraw()
Jovan