Angular DataTable + button Column Visibility
Angular DataTable + button Column Visibility
Hello, I am using the buttons.colVis plugin. After turning it on, the buttons are arranged horizontally ... And although they work, the appearance of the buttons does not change. Not visible button pressed or not. Also, I did not find how it is possible to exclude one of the column visibility buttons, with their help it is possible to make visible columns that should be constantly not visible. How can I arrange the buttons vertically, make the on / off switch visible, exclude the button for the first column?
// Dieser Service hilft beim Erstellen Ihrer Datentabelle-Optionen
vm.dtOptionsBestaende = DTOptionsBuilder.newOptions()
.withDataProp('data')
.withDOM('Brtip')
.withDisplayLength(36)
.withLanguage(dtLanguageDe)
.withOption('order', [0, 'asc'])
.withOption('select', {
info: false,
style: 'single',
toggleable: false
})
.withOption('ajax', {
url: 'Bestaende/GetDtFlatexDepotBestaende', // Aufruf von - controller/method
error: function (jqXHR, textStatus, errorThrown) {
alert('Es ist ein Fehler aufgetreten:\n' + errorThrown + '\nBitte Seite neu laden.');
console.log(jqXHR);
console.log(textStatus);
console.log(errorThrown);
},
type: 'POST',
data: function (d) {
d.FilterDatumVon = moment(vm.datumVon).format('Y-MM-DD HH:mm:ss');
d.FilterDatumBis = moment(vm.datumBis).format('Y-MM-DD HH:mm:ss');
d.FilterDepotBezeichnung = vm.filterDepotBezeichnung;
d.FilterISIN = vm.filterIsin;
},
})
.withOption('serverSide', true)
.withOption('orderMulti', false)
.withOption('deferRender', true)
.withOption('paging', true)
.withOption('processing', true)
.withOption('rowCallback', vm.rowCallback)
.withOption('scrollX', true)
.withOption('stateSave', true)
.withOption('buttons', [ 'colvis' ])
;