Getting visible columns names

Getting visible columns names

artem78artem78 Posts: 7Questions: 5Answers: 0

I`m using colVis plugin. How can I get names of all visible at the moment columns?

Answers

  • allanallan Posts: 61,716Questions: 1Answers: 10,108 Site admin

    ColVis is deprecated. Buttons is its replacement.

    When you say the "name", do you mean that set by columns.name? If so, there isn't a way to do that I'm afraid.

    Allan

  • artem78artem78 Posts: 7Questions: 5Answers: 0

    Yes, I mean just that.

  • artem78artem78 Posts: 7Questions: 5Answers: 0

    You said that it`s impossible, but I found the solution: https://jsfiddle.net/crazzzy/3acbfre2/1/

  • allanallan Posts: 61,716Questions: 1Answers: 10,108 Site admin

    Very clever - nice one :smile:. Thanks for sharing your solution with us.

    I'm going to add a columns().names() method in future, the current absence of which is what I was referring to above.

    Allan

This discussion has been closed.