Data table horizontal scroll

Data table horizontal scroll

udhaya2kmrvudhaya2kmrv Posts: 6Questions: 4Answers: 0
edited December 2014 in Free community support

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 : [] });

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 63,691Questions: 1Answers: 10,500 Site admin

    When DataTables doesn't need to scroll - it shouldn't. For example: http://live.datatables.net/nuqipoqe/1/edit .

    Allan

  • udhaya2kmrvudhaya2kmrv Posts: 6Questions: 4Answers: 0
    edited December 2014

    i am using fixed column plugin. So automatically table scroll will come. My table have dynamic columns. so some times i dont need fixed column(its horizontal scrolling feature). just two column there but it has scroll. how to prevent this?

  • allanallan Posts: 63,691Questions: 1Answers: 10,500 Site admin
    Answer ✓

    Can you link to the page please? FixedColumns shouldn't "activate" if scrolling isn't being used: http://live.datatables.net/nuqipoqe/2/edit .

    Allan

This discussion has been closed.