Floating point plugin

I am using angularjs datatable and trying to use the button plugin on this page https://l-lin.imtqy.com/angular-datatables/#/withButtons

.withButtons([ 'columnsToggle', 'colvis', 'copy', 'pdf', 'excel', { text: 'Some button', key: '1', action: function (e, dt, node, config) { alert('Button activated'); } } ]); 

I get an Unknown button type: 'columnsToggle' and 'colvis' but when I remove the “columnsToggle” and “colvis” from the code, it starts without any problems, but the other button is not displayed except for the custom button

 { text: 'Some button', key: '1', action: function (e, dt, node, config) { alert('Button activated'); } } 

copy, pdf, excel does not appear, can someone help me solve the problem, please?

+5
source share
1 answer

I had the same problem as you, and I found out all the necessary datatables-buttons js files:

 <script type="text/javascript" src="~/Scripts/datatables-buttons/js/dataTables.buttons.js"></script> <script type="text/javascript" src="~/Scripts/datatables-buttons/js/buttons.bootstrap.js"></script> <script type="text/javascript" src="~/Scripts/datatables-buttons/js/buttons.jqueryui.js"></script> <script type="text/javascript" src="~/Scripts/datatables-buttons/js/buttons.colVis.js"></script> <script type="text/javascript" src="~/Scripts/datatables-buttons/js/buttons.flash.js"></script> <script type="text/javascript" src="~/Scripts/datatables-buttons/js/buttons.html5.js"></script> <script type="text/javascript" src="~/Scripts/datatables-buttons/js/buttons.print.js"></script> 
+8
source

Source: https://habr.com/ru/post/1234783/


All Articles