colVis not works

colVis not works

antoniocibantoniocib Posts: 277Questions: 62Answers: 1

Hello, I've been trying for over an hour but I can't implement colVis in my code. I've tried a lot of libraries but nothing comes out.

This is my HTML:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
        <link rel="stylesheet" type="text/css" href="css/pre.css">
        <link rel="stylesheet" type="text/css" href="css/selectize.css">
        <link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/selectize.js/0.9.0/css/selectize.css">
        <link rel="stylesheet" type="text/css" href="css/generator-base.css">
    <link rel="stylesheet" type="text/css" href="css/editor.dataTables.min.css">
        <link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/buttons/1.7.0/css/buttons.dataTables.min.css"/> 
        <link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/v/dt/dt-1.11.3/rg-1.1.4/datatables.min.css"/>
 
        <script type="text/javascript" src="https://cdn.datatables.net/buttons/1.7.0/js/dataTables.buttons.min.js"></script>
        <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.32/vfs_fonts.js"></script> -->
        <script   type="text/javascript" charset="utf-8"  src="https://cdn.datatables.net/plug-ins/1.10.20/sorting/datetime-moment.js"></script>
        <script  type="text/javascript" charset="utf-8"  src="https://cdn.datatables.net/plug-ins/1.10.19/dataRender/datetime.js"></script>
        <script type="text/javascript" charset="utf-8"src="https://cdnjs.cloudflare.com/ajax/libs/selectize.js/0.9.0/js/standalone/selectize.js"></script>
        <script type="text/javascript" charset="utf-8"src="js/selectiz.js"> </script>
    <script type="text/javascript" charset="utf-8" src="js/dataTables.editor.min.js"></script>
        <script type="text/javascript" charset="utf-8" src="js/table.scrivania.js"></script>
        

This is JS:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
var table = $('#Buono').DataTable( {
 
    dom: 'BPfrtip',
    //dom: 'lfBrtip',
    paging: false,
    ajax: {
            url: 'php/table.Buono.php',
            type: 'POST',
            data: function (d) {
                d.startDate = $('#startDate').val();
                d.endDate = $('#endDate').val();
 
            }
 
    },
    order:[10,8],
searchPanes:{
    columns:[10],
    hideCount: true
},
//deferRender: true,
//colReorder: true,
 
colReorder: true,
buttons: [{
    extend: 'colvis',
    text: 'Main Columns',
    columns: ':not(.noColVis):not(.extra)'
},
{
    extend: 'colvis',
    text: 'Extra Columns',
    columns: '.extra'
}],
 
 
 
 
columns:[
 
{
                "data": "buono.id_spedizione",
                orderable:false,
            searchable:false  //0
            },
            {
                "data": "buono.data_spedizione",
                orderable:false,
            searchable:false //1
            },

Answers

Sign In or Register to comment.