0

I am using Datatable ver 1.10, I enable the vertical scrolling. now datatable showing window default scroll style.

Is it possible to change/implement some other scrollBar on datatable scrollbar? to make it more beautiful and fancy.

enter image description here

I tried this solution at stackoverflow but it squeez the header. also I want header and footer fixed position.

Community
  • 1
  • 1
Qazi
  • 5,015
  • 8
  • 42
  • 62

1 Answers1

2

here is my working code

// when initialization is completed then apply scroll plugin
"fnInitComplete":function(){
    $('.dataTables_scrollBody').perfectScrollbar();
},

//apply scroll on this height
"scrollY": 450,

//on paginition page 2,3.. often scroll shown, so reset it and assign it again 
"fnDrawCallback": function( oSettings ) {
    $('.dataTables_scrollBody').perfectScrollbar('destroy').perfectScrollbar();
},
  • hi i is there any work around if i use colvis (the one that hide or show column) in my datatables? since if i horizontal scroll and then hide some column, it is not automatically aligned and show some blank column.... – PamanBeruang Sep 23 '16 at 08:57