ColReorder.order() automatically redraws the table, is there a way to defer this?
ColReorder.order() automatically redraws the table, is there a way to defer this?
chiloutus
Posts: 10Questions: 4Answers: 0
Hi,
I've recently come across a need to defer the redrawing of the table after I change the order. It appears to me in the documentation that this may be possible but I've been struggling to understand how to do this.
Is there a way defer the redraw until I've calculated visibility and the like
Here is a jsfiddle illustrating the automatic redraw.
http://jsfiddle.net/273y3a36/3/
Edit: Updated fiddle
This question has accepted answers - jump to:
This discussion has been closed.
Answers
I'm sorry to say that there is no option to defer this. The
colReorder.order()
method will redraw the table immediately.Allan
I see, thank you for your response. While I have this still open I have a question regarding the second parameter in column(x).visible(false,false).
It seems that this hides the columns immediately also however the documentation mentions there is some performance gain on using false rather than the default. Could you comment on redrawCalculations and what it is doing?
It basically runs
columns.adjust()
if you don't passfalse
as the second parameter.If you are going to set the visibility of multiple columns, then you are best to do that only once.
Allan
Understood, thanks for your responses, they've been very helpful.