How to group the columns of the "colvis" button dropdown?

How to group the columns of the "colvis" button dropdown?

halloeihalloei Posts: 23Questions: 6Answers: 0

Link to test case: https://jsfiddle.net/k3d9m2et/1/
Debugger code (debug.datatables.net):
Error messages shown: %
Description of problem: %
I have many columns (30+) which I'm grouping with complex headers to keep the overview. Additionaly, the user can show/hide individual columns with the help of the colvis button.

As you can imagine, the dropdown of the colvis button is pretty long. To enhance the user experience, I'd like the columns listed there to be grouped as well. So if you look at my example from JSFiddle, this is the current style:

Name
Birthday
Position
Salary
Office
Extn.
E-mail

But I like the colvis dropdown to look like this:

Person
  Name
  Birthday
HR Information
  Position
  Salary
Contact
  Office
  Extn.
  E-mail

Is there any way to achieve this?

Answers

  • halloeihalloei Posts: 23Questions: 6Answers: 0
    edited November 2022

    As I'm thinking about it, a table-style dropdown would be even better as having a super long dropdown:

    Person HR Information Contact
    Name Position Office
    Birthday Salary Extn.
    E-mail

    But I'd be thankful for any kind of solution.

Sign In or Register to comment.