exclude column from export
exclude column from export
Hello,
I want to export visible columns excluding the columns with class .noExport
setting export options to:
exportOptions: {
columns: ":visible:not(.noExport)"
}
and it works oposite as expected. It exports :visible and columns with class .noExport
setting
exportOptions: {
columns: ":visible.noExport"
}
works as per my need, but it seems contrary to what I expected.
Is it ok? and most important, will it work always or am I missing something?
This question has an accepted answers - jump to answer
Answers
It seems to be working as expected here. I've put the class "noExport" on the "Position" column, and made the fourth column, "Age", not visible - and both of those aren't appearing in the export.
Could you look at that, please, and see if it helps. If it's still not working for you, please can you update my example, or link to your page, so that we can see the problem.
Cheers,
Colin
Yes, it works as expected. Thanks.
exportOptions: {
columns: ":visible:not(.noExport)"
}
exports visible columns which have not the .noExport class.
The problem was in another part of the code. Classes are added dynamically and there was a bug there which did the oposite of the expected.