need a more performant use of the api
need a more performant use of the api
ajoslin103
Posts: 20Questions: 4Answers: 0
given an array of booleans indicating intended column visibility
is there a faster way to set the visibility of each column?
$.fn.dataTable.Api('#table-1').columns().every(function(ndx){
this.visible(weeksVisible[ndx]);
});
thanks,
Al;
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
Yes, pass
false
as a second parameter tocolumn().visible()
. Otherwise it is doing the full redraw calculations every time around that loop!Call
columns.adjust()
once the loop has completed.Allan