Buttons Toggle Based On Hidden Column Value & Initial Filtered Value

Buttons Toggle Based On Hidden Column Value & Initial Filtered Value

JoyrexJoyrex Posts: 92Questions: 14Answers: 3
edited April 2018 in Free community support

I'm trying to set up a table that has records marked active and inactive (represented by a hidden column containing 1 or 0), and initially have only the active (1) records shown. I've managed to accomplish the initial filter by using the searchCols feature.

Where I am running into problems is making a custom button in Buttons that acts as a toggle for showing active/inactive. I know I can script this outside of DataTables, but I would prefer a solution in Buttons and using the DataTables API.

There's also the issue of accounting for the initially filtered value and how to clear that with the same button toggle.

I've created a Fiddle with what I have working so far: http://live.datatables.net/pexapoke/1/edit

Any direction on how to create the toggle button using Buttons would be greatly appreciated.

Replies

This discussion has been closed.