Hide certain columns when page loads, but allow them to be added using colvis

Hide certain columns when page loads, but allow them to be added using colvis

u20241229u20241229 Posts: 4Questions: 2Answers: 0

Hi,

This is my simple test case: https://live.datatables.net/taborero/1/

By default, all columns are visible when the page loads:

  • Name
  • Position
  • Office
  • Age
  • Start date
  • Salary

I can show / hide columns since colvis is set in the JS to initialise the data tables.

Is there a way I can configure the settings so that e.g. Age and Start date are hidden when the page loads, but then can be made visible using the "Column Visibility" menu?

Any advice much appreciated.

Thanks

Jim

This question has an accepted answers - jump to answer

Answers

Sign In or Register to comment.