Allow hidden columns to apply to other tables (with the same columns)

Allow hidden columns to apply to other tables (with the same columns)

ZZBrentZZBrent Posts: 2Questions: 2Answers: 0

I am using the Buttons plug-in to allow users to mark columns as hidden after accessing the datatable. While navigating the website, whenever I come back to a table that I have changed, the columns I selected remain hidden. Is there a way to have these change apply for other tables in the website that use the same columns?

Ideally I would like all tables with the same column names to change their views when the "Hide/Show" columns settings are changed. How do I control this?

Answers

  • colincolin Posts: 8,013Questions: 0Answers: 1,348
    edited February 13

    As far as DataTables is concerned, each table is unique so there's no connection between them. You could use stateSave, using stateLoadCallback and stateSaveCallback to store the information on a server which can then have logic to manipulate multiple tables.

    Colin

Sign In or Register to comment.