Reputation: 445
I couldn't find any information about this yet.
At the moment I am doing it like this:
What I would like to do:
3.Export the generated table for further use
Any better ideas how to do it without having to repost my settings for an update of the table again all the time?
Upvotes: 0
Views: 411
Reputation: 419
I used colvis buttons like this in my project to show/hide columns :
"dom": 'lZBfrtip',
buttons: [
{
extend: 'colvisGroup',
text: 'STANDARD',
show: [ 0,1,2,3,4,39 ],
hide: [ 41,42,43,44,45,46,47 ],
className: "standard-btn"
},
{
extend: 'colvisGroup',
text: 'DOCS',
show: [ 0,1,2,3,4,39,41 ],
hide: [ 42,43,44,45,46,47 ],
className: "ext-btn"
}
]
The code above is placed in my datatable object. docs for colvis https://datatables.net/reference/button/colvis
Upvotes: 1