Skip to content

Disable Download data #147

Answered by evanwill
mrgamhong asked this question in Q&A
Mar 13, 2025 · 2 comments · 3 replies
Discussion options

You must be logged in to vote

Note, the Excel/CSV buttons on the datatable are for downloading the current view of the datatable (it will contain only what you have configured to display on the page, as filtered and sorted by the user).

You can remove that functionality by editing "_includes/js/table-js.html". Look for the lines:

// add download features
dom: 'B<"row mt-2"<"col-md-6"l><"col-md-6"f>>t<"row"<"col-md-6"i><"col-md-6"p>>', 
buttons: [ 'excelHtml5', 'csvHtml5' ],

and comment them out or delete,

// add download features
// dom: 'B<"row mt-2"<"col-md-6"l><"col-md-6"f>>t<"row"<"col-md-6"i><"col-md-6"p>>', 
// buttons: [ 'excelHtml5', 'csvHtml5' ],

The datatable won't add the buttons.

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
3 replies
@mrgamhong
Comment options

@evanwill
Comment options

Answer selected by mrgamhong
@mrgamhong
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants