Reputation: 197
I am not able to find a perfect example in which I can see how to set the filename dynamically for my PDF file in datatables. I am using datatables
version 1.10.0 and tabletools
version 2.2.4.
Upvotes: 0
Views: 438
Reputation: 5075
you can use sTitle
property of tableTools configs
var fileName = (function() {
//run your logic to generate dynamic file name;
return "computedFileName";
})();
then
tableTools: {
"aButtons": [
{
"sExtends": "pdf",
"sTitle": fileName
}
]
}
Upvotes: 1