From the FAQ:
How do I change the default settings, like can I turn paging off? Can I change the page length? Can I change the sort order?
All of these DataTables options are accessible through shortcode attributes. The shortcode attribute is an underscore-separated version of the DataTables’s CamelCase’ed option name, prefixed with datatables_
. For instance, to turn off paging, you need to set the DataTables paging
option to false, so you would use a shortcode like this:
[gdoc key="ABCDEFG" datatables_paging="false"]
Similarly, to change how many rows appear per page, you need to use the DataTables pageLength
option, setting it to a number. Its default is 10, so if you wanted to show 15 rows per page, you would use a shortcode like this:
[gdoc key="ABCDEFG" datatables_page_length="15"]
Putting that together with the fact that the DataTables option you’re looking for is columns.visible
, you should be able to deduce that there is a shortcode attribute that allows you to set the value of the columns.visible
DataTable configuration option for your sheet.
Sure enough, if you actually read the README file that comes with this plugin (or just click around on this website), you’ll find that there is a complete listing of all the shortcode attributes this plugin provides. That list is on this page.
The next step is to examine that list of recognized attributes and see if one matches the pattern of being an underscore-separated name for the option you want. Here is an excerpt of that list from that page:
datatables_search
datatables_state_duration
datatables_stripe_classes
datatables_select
datatables_tab_index
datatables_column_defs
datatables_columns
Since you want to customize the columns.visible
option, it’s unlikely that the datatables_tab_index
attribute is the one you want, right? I believe you can figure out which attribute you need to use. ??