Hi,
I would like to add a button right to the 'Filter' field. I try to use the custom toolbar API but this creates a new toolbar on top of the filter field. I want it to be on the same line.
here is my code:
jQuery('.datatable_custom').dataTable({
"sScrollY": "700px",
"bPaginate": false,
"bScrollCollapse": true,
"bFilter": true,
"bSort": true,
"bInfo": false,
"bAutoWidth": false,
"sDom": '<"H" <"toolbar">fr>t'
});
$("div.toolbar").html('<span style="margin-left: 1em;"><img src="images/b_export_xls.gif" title="{t}Export to CSV{/t}" /></span>');
The real purpose of this is that it seems that dataTable can only export to CSV using Flash. THis has been discussed many times in the forum, but your answer is always to do something on server side, which seems odd. Some very simple JS libraries can do the job (I'm using www.kunalbabre.com/projects/table2CSV.php), So i'd like to 'plug' it on dataTables.
But mabe I haven't found the right post in the forum ?
Thanks