Export print remove tag select in multi filter
Export print remove tag select in multi filter
lazzy
Posts: 21Questions: 8Answers: 0
I have multi filter for each column input and select
When i use button for export or print tag <input/> remove but <select> <option> doesn't remove how can i remove <option> in data.header, data.footer?
This discussion has been closed.
Answers
I think you can fix
in this file datatables/Buttons-1.5.2/js/dataTables.buttons.js
in this function var _exportData = function ( dt, inOpts )
format: {
header: function ( d ) {
d = $(d).remove("option").html();
return strip( d );
},
footer: function ( d ) {
d = $(d).remove("option").html();
return strip( d );
},
Because function strip below doesn't remove tag option
Hi @lazzy ,
We're happy to take a look, but it would help, as per the forum rules, if you could link to a running test case showing the issue so we can offer some help. Information on how to create a test case (if you aren't able to link to the page you are working on) is available here.
Cheers,
Colin
Oh I'm very sorry i don't know about rules
Here is my case
http://live.datatables.net/tudewavu/1/edit
I test for column office
Hi @lazzy ,
Thanks for that, I understand now. This example here should help - it's not quite the same, it's changing the colour of the header, but you can do something similar and modify the contents instead. An alternative is to modify the data going to the export with
exportOptions
, see here for more info on that.Cheers,
Colin