Show the colvis button, but do not include the 1st,3rd in colvis menu

Show the colvis button, but do not include the 1st,3rd in colvis menu

sarath_datatablessarath_datatables Posts: 16Questions: 8Answers: 0
edited December 2017 in Free community support

implemented colvis button and tried to customize the options visibility:

followed from https://datatables.net/reference/button/colvis#Examples

Would like to hide the first and third with following code.But it is hiding all 1,2,3 coumns in the colvis menu.Is there any way to hide only 1 and 3 but not the 2nd column and show 4th to all remaining columns?

dom: 'Blfrtip',
            buttons: [{
                extend: 'colvis',
                columns: ':gt(0):gt(1)',
                text: 'Column Visibility',
                titleAttr: 'By clicking on a field you could hide or show some extra columns in the table.'
            }],
This discussion has been closed.