buttons: not always display excel and pdf export button
buttons: not always display excel and pdf export button
f.cannillo
Posts: 5Questions: 2Answers: 0
Hi, I have this strange issue.
Sometimes I cannot see all export button (only excel and pdf) but only COPY button.
Below you can see my code:
$(document).ready(function () {
var dtable = $('#GVOrdinato').dataTable({
"language": {
"url": "/assets/localization/datatables.it.txt"
},
"dom": 'Bfrltip', //'<"top"iB>rt<"bottom"flp>',
buttons: [
'copy',
'excelHtml5',
{
extend: 'pdfHtml5',
orientation: 'landscape',
pageSize: 'A4',
message: getfilter()
}
]
});
function getfilter() {
var sStringa = "Filtri: ";
if ($("#<%=TxtArticolo.ClientID%>").val().length > 0) {
sStringa = sStringa + "Articolo: " + $("#<%=TxtArticolo.ClientID%>").val() + "; ";
}
return sStringa;
};
// continue with other code.
Please any suggest?
Many Thanks.
Francesco
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
Thanks for your question - however, per the forum rules can you link to a test case showing the issue please. This will allow the issue to be debugged.
Information on how to create a test page, if you can't provide a link to your own page can be found here.
Thanks,
Allan
Hi Allan, thanks for reply.
try to go here http://bitto.it-s.it/ordinato2.aspx and try to paste on "Ricerca Articoli" this code BIT4939 H567 then click on it and then press "CERCA".
Many thanks
Thanks - that is one massive page. 17MB and loading time of about 5 minutes. I don't think the export buttons will work very well with that. Indeed, my browser is exceptionally slow just with the table, never mind exporting.
In fact it just crashed.
Having said that, I think the issue is the load order. Could you load the pdfmake and JSZip libraries before any of the DataTables files?
Allan
Thanks Allan, problem sorted!!!!