I am using the following code to create a datatable. I am pulling data via ajax, but only at the start, so all filtering and sorting etc, is on the client side. If I populate the rows in the table directly I can get all of my filtered results, but if I use the ajax call (which allows me to take advantage of the "Processing..." message) it exports only the current page of data.
Again I am sure I am missing something simple, but can't see what it is.
Thanks in advance!
var oTable = $('#dataTableAccountList').dataTable({ "sDom": "<'row'<'col-lg-6'l><'col-lg-6'Tf>r>t<'row'<'col-lg-6'i><'col-lg-6'p>>", "bServerSide": false, "bDeferRender": true, "sAjaxSource": '@Url.Action("AccountLoadThroughAjaxCall", "AccountList")', "bProcessing": true, "oTableTools": { "sSwfPath": "/Scripts/TableTools-2.2.0/swf/copy_csv_xls_pdf.swf", "aButtons": [ { "sExtends": "copy", "oSelectorOpts": { filter: 'applied', order: 'current' } }, { "sExtends": "xls", "oSelectorOpts": { filter: 'applied', order: 'current' }, "sFileName": "AccountList_yyyy-MM-dd_hh.mm.ss.xls" }, { "sExtends": "pdf", "oSelectorOpts": { filter: 'applied', order: 'current' }, "sFileName": "AccountList_yyyy-MM-dd_hh.mm.ss.pdf", "sPdfOrientation": "landscape", "sPdfMessage": "Account List" + ($('div.dataTables_filter input').length > 0 ? " Filter: " + $('div.dataTables_filter input').val() : "") }, { "sExtends": "print", "oSelectorOpts": { filter: 'applied', order: 'current' }, } ] } });
Again I am sure I am missing something simple, but can't see what it is.
Thanks in advance!