Can Button Element Control Multiple DataTables

Can Button Element Control Multiple DataTables

NewBee2017NewBee2017 Posts: 4Questions: 3Answers: 0

I would like to use Column Visibility to show/hide columns. Right now, I have two datatables with same column names.

How can I use one button to show/hide column with the same column names in the two tables at the same time?

Answers

  • allanallan Posts: 63,457Questions: 1Answers: 10,465 Site admin

    To do this, have the column visibility buttons for just the first table and add a column-visibility event listener on that table and then use the column().visible() method on the second table to mirror the column visibility from the first on the second.

    Allan

This discussion has been closed.