Column Visibility Button Not Working w/ Bootstrap Template

Column Visibility Button Not Working w/ Bootstrap Template

TomHallTomHall Posts: 27Questions: 10Answers: 1

I purchased a template from Foxy Themes that uses Bootstrap . The Integration is such that I created a table using Classic ASP on the page, then a function is called that ties that table to datatables.

I added the "colvis" to the code and the button shows fine, but clicking on it does nothing. Any help would be appreciated.

`
var App = (function () {
'use strict';

App.dataTables = function( ){

//We use this to apply style to certain elements
$.fn.DataTable.ext.pager.numbers_length = 4;
$.extend( true, $.fn.dataTable.defaults, {
  dom:
    "<'row be-datatable-header'<'col-sm-6'l><'col-sm-6'f>>" +
    "<'row be-datatable-body'<'col-sm-12'tr>>" +
        "<'row be-datatable-footer'<'col-sm-5'i><'col-sm-7'p>>",
    buttons: [
        'excel', 'pdf', 'print', 'colvis'
    ]
});

  $(".datetimepicker").datetimepicker({
      autoclose: true,
      componentIcon: '.mdi.mdi-calendar',
      format: 'mm/dd/yyyy',
      navIcons: {
          rightIcon: 'mdi mdi-chevron-right',
          leftIcon: 'mdi mdi-chevron-left'
      }
  });


$("#table3").dataTable({
  "lengthMenu": [[10, 25, 50, -1], [10, 25, 50, "All"]],
  dom:  "<'row be-datatable-header'<'col-sm-6'l><'col-sm-6 text-right'B>>" +
        "<'row be-datatable-body'<'col-sm-12'tr>>" +
        "<'row be-datatable-footer'<'col-sm-5'i><'col-sm-7'p>>",
    buttons: [
        'excel', 'pdf', 'print', 'colvis'
    ]

});

};

return App;
})(App || {});
`

This question has accepted answers - jump to:

Answers

  • TomHallTomHall Posts: 27Questions: 10Answers: 1
    Answer ✓

    I figured it out, the template had not included the css file. Silly me.

    How do I delete a question such as this one?

  • allanallan Posts: 63,523Questions: 1Answers: 10,473 Site admin
    Answer ✓

    No worries - questions are sometimes obvious in retrospect, but very frustrating before that. Been there plenty of times myself. I’ve marked your own answer as resolving this thread.

    Allan

This discussion has been closed.