Change column names in ColVis

Change column names in ColVis

smenzersmenzer Posts: 3Questions: 1Answers: 0

I would like to know how you can change the name of the columns that appear in the ColVis extension (when you click the button to choose the columns to display/hide).

I read the thread at https://datatables.net/forums/discussion/31748/dynamic-column-names-in-colvis-buttons but wasn't satisfied with the hacky answer, which also doesn't scale well for me (I don't want to have to hard code in the column names and orders in my JS - I want that managed by my HTML).

I have looked at https://datatables.net/reference/button/colvis and don't see the label callback function (that seemed to exist in previous version, as described here: https://www.datatables.net/extensions/colvis/options), so I'm wondering if it's not documented, missing, or if there's another way to accomplish this.

This discussion has been closed.