I am attempting to prevent some columns from a bootstrap 1.11.1 table from appearing in the export by using the data-tableexport-display="none" on the column headers and the data cells. The headers (
) are still appearing in the export, but the data cells are not there making it so that the data is all off by the number of columns that I am attempting to remove.
After stepping though the code, I feel the problem is related to the fact that I am using bootstrap table in combination with tableExport. In the IsVisible function, where it is attempting to determine if the data-tableexport-display attribute is on the tag, it is using the jquery attr() function. This is coming back undefined on the column headers. I think that when using bootstrap, it is interpreting the data attributes making them unavailable for attr() and making it so the data() function needs to be used in order to determine if the tableexportDisplay value is available and its value.
The work around I was able to use was to use the ignoreColumn attribute as part of the exportOptions within the bootstrap table setup.
Thanks for sharing your work around.
How did you add the data-tableexport-display attribute to the bootstrap table?
For further investigation some sample code would be very helpfull.
I am attempting to prevent some columns from a bootstrap 1.11.1 table from appearing in the export by using the data-tableexport-display="none" on the column headers and the data cells. The headers (
After stepping though the code, I feel the problem is related to the fact that I am using bootstrap table in combination with tableExport. In the IsVisible function, where it is attempting to determine if the data-tableexport-display attribute is on the tag, it is using the jquery attr() function. This is coming back undefined on the column headers. I think that when using bootstrap, it is interpreting the data attributes making them unavailable for attr() and making it so the data() function needs to be used in order to determine if the tableexportDisplay value is available and its value.
The work around I was able to use was to use the ignoreColumn attribute as part of the exportOptions within the bootstrap table setup.
Thanks for sharing your work around. How did you add the data-tableexport-display attribute to the bootstrap table? For further investigation some sample code would be very helpfull.