force deferRendering to false after datatables has been rendered
force deferRendering to false after datatables has been rendered
Xeli
Posts: 4Questions: 1Answers: 0
I've build an export to csv funtion for datatables, which does some application specific stuff, like break a column up into seperate column. So I can't really use a generic export function.
This exportfunction works great except when I turn on deferRendering. The reason why it breaks is because the _ (and I assume the $ aswell) doesn't pick up rows that haven't been rendered yet. Makes a lot of sense.
However I really want to the selectors to be able to get all the rows.
So my question is: Is there a way to force the rendering of all the rows?
This exportfunction works great except when I turn on deferRendering. The reason why it breaks is because the _ (and I assume the $ aswell) doesn't pick up rows that haven't been rendered yet. Makes a lot of sense.
However I really want to the selectors to be able to get all the rows.
So my question is: Is there a way to force the rendering of all the rows?
This discussion has been closed.
Replies
If deferred rendering is enabled, then the only way is by drawing every row. However, if you know that you are going to need the nodes, why enable deferred rendering?
Allan
Is there a way to 'draw' every row without the user seeing it? Doing it manually I could just click on every page, but I would like a way without the user noticing it.
Allan
var settings = table.fnSettings();
var oldDisplayLength = settings._iDisplayLength;
settings._iDisplayLength = -1;
table.fnDraw();
settings._iDisplayLength = oldDisplayLength;
table.fnDraw();
Thanks for the help