ColVis with checkboxes only (without 'show/hide' button)

ColVis with checkboxes only (without 'show/hide' button)

thebastithebasti Posts: 2Questions: 0Answers: 0
edited February 2014 in General
Is it possible to somehow get ColVis to always display column checkboxes? I'd like to have a list of columns with checkboxes and eliminate the dropdown.

Is there a way to achieve this?

Replies

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    Not with ColVis itself, but ColVis is just a wrapper around fnSetColumnVis ( `column().visible()` in 1.10), so you could easily just add checkboxes to your document and call the methods using an event handler.

    This example shows it with links:
    1.9: http://datatables.net/release-datatables/examples/api/show_hide.html
    1.10: http://next.datatables.net/examples/api/show_hide.html

    Allan
  • thebastithebasti Posts: 2Questions: 0Answers: 0
    Thanks Allan. Exactly what I was looking for.
This discussion has been closed.