show/hide column in Data table

show/hide column in Data table

nikoo56nikoo56 Posts: 1Questions: 1Answers: 0

I use the show/hide column in this link:

https://datatables.net/examples/api/show_hide.html

I wonder how instead of showing all the column, show 5 column and the hide/show the rest of columns?

Answers

  • allanallan Posts: 63,356Questions: 1Answers: 10,444 Site admin

    You'd use the columns() selector to select only the columns you want to manipulate. In the example it only needs a single column so it uses column() to select the column with a single index.

    Allan

This discussion has been closed.