How to get entire grid data using aoData when using bDeferRender option (client side)
How to get entire grid data using aoData when using bDeferRender option (client side)
bbarani
Posts: 32Questions: 0Answers: 0
Hi,
I have implemented a separate excel export functionality by using the data from aoData.
Everything works fine if I don't set the bDeferrender option, else only the visible data is getting exported to excel. Can you please let me know the best way to get all the data in the grid if I use bDeferrender option?
[code]
$(dTable.fnSettings().aoData).each(function () {
$(this.nTr).each(function (c) {
var nTds = $('td', this);
for (var j = 0; j < nTds.length; j++) {
excel.ActiveSheet.Cells(i + 3, j + 1).Value = $(nTds[j]).text();
}
i = i + 1;
});
});[/code]
Thanks,
Barani
I have implemented a separate excel export functionality by using the data from aoData.
Everything works fine if I don't set the bDeferrender option, else only the visible data is getting exported to excel. Can you please let me know the best way to get all the data in the grid if I use bDeferrender option?
[code]
$(dTable.fnSettings().aoData).each(function () {
$(this.nTr).each(function (c) {
var nTds = $('td', this);
for (var j = 0; j < nTds.length; j++) {
excel.ActiveSheet.Cells(i + 3, j + 1).Value = $(nTds[j]).text();
}
i = i + 1;
});
});[/code]
Thanks,
Barani
This discussion has been closed.
Replies
Btw - I'd sternly recommend against using anything from the settings object. It is considered private and might change between releases. Use the public API if possible.
Allan
[code]
var data = dTable.fnGetData();
for(var value=0;value