Udhaya Kumar V
Udhaya Kumar V

Reputation: 83

Datatable Scroll Enable when it dont need

Here is my datatable declaration. I have a table n number of columns some times it will come just two column that time also scoll will enable. It will make some irritating table. How to avoid scroll when it dont needs and i want fixed column of first column.

var shTable = jQuery('#example').DataTable({
                scrollX:        true,
                scrollCollapse: true,
                bScrollAutoCss: false,
                paging:         true,
                responsive: true,
                aaSorting : []  
            });

Upvotes: 1

Views: 826

Answers (1)

SimarjeetSingh Panghlia
SimarjeetSingh Panghlia

Reputation: 2200

try this one

var shTable = jQuery('#example').DataTable({
                scrollX:        true,
                scrollCollapse: true,
                bScrollAutoCss: false,
                paging:         false,
                scrollY:        200px,
                responsive: true,
                aaSorting : []  
            });

Upvotes: 3

Related Questions