Horizontal Scroll

Horizontal Scroll

freecexfreecex Posts: 25Questions: 4Answers: 0

Hi,

I've a table with 50 columns.
I'm trying to get horizontal scroll bar.
I added

$('#tbfstorico').DataTable({
"processing": true,
"serverSide": false, // for process server side

       "scrollX": true, <------THIS

        "filter": true,         // this is for disable filter (search box)
        "orderMulti": true,     // for disable multiple column at once
        "responsive": true,
        "pageLength": 10,
        "searchDelay":1000,
        "bAutoWidth": false,

but I can scroll only for 6 column on the right.... and the rest? why is not scrollin?

Regards

This question has an accepted answers - jump to answer

Answers

  • kthorngrenkthorngren Posts: 21,242Questions: 26Answers: 4,929

    Is responsive being invoked?
    "responsive": true,

    Kevin

  • freecexfreecex Posts: 25Questions: 4Answers: 0

    Yes it is!

    "processing": true,
    "serverSide": false, // for process server side

            "sScrollX": "100%",
            "sScrollXInner": "110%",
            "bScrollCollapse": true,
    
            "filter": true,         // this is for disable filter (search box)
            "orderMulti": true,     // for disable multiple column at once
            "responsive": true,
            "pageLength": 10,
            "searchDelay":1000,
            "bAutoWidth": false,
    
  • freecexfreecex Posts: 25Questions: 4Answers: 0

    is there something like maximum col number???

  • kthorngrenkthorngren Posts: 21,242Questions: 26Answers: 4,929

    I might be missing something but with responsive true when would you expect the horizontal scroll bar to appear?

    Kevin

  • freecexfreecex Posts: 25Questions: 4Answers: 0

    I've got 50 column.
    Srollbar appears but only untill column nr 12, as you can see in attached file...
    I'd like to scroll for 38 col more.... ;)

    (https://datatables.net/forums/uploads/editor/wz/i462t42ztkrh.png "")

  • kthorngrenkthorngren Posts: 21,242Questions: 26Answers: 4,929

    Are the other columns hidden by responsive?

    Maybe you can link to your page or provide an example so we can see what you are doing.
    https://datatables.net/manual/tech-notes/10#How-to-provide-a-test-case

    Kevin

  • freecexfreecex Posts: 25Questions: 4Answers: 0

    priorty is a column or a datatable property?

  • freecexfreecex Posts: 25Questions: 4Answers: 0

    sorry... make a mistake.

    question was: responsive is a table property or somthing I've to set column by column?

  • kthorngrenkthorngren Posts: 21,242Questions: 26Answers: 4,929

    There's lots of options for responsive. The docs are here:
    https://datatables.net/extensions/responsive/

    Take a look at the examples. They may help you decide how you want to configure it.

    Kevin

  • freecexfreecex Posts: 25Questions: 4Answers: 0

    Hi Kevin!
    I found a problem on my

    <

    table> section and now all columns appears.
    Only 1 thing: now scroll until Column 30 and to see the rest I have to press + button at the beginning of the row. Can I hide this button and scroll until last column with the bar?

  • kthorngrenkthorngren Posts: 21,242Questions: 26Answers: 4,929

    You can disable responsive by commenting out or removing "responsive": true, from your config. All of the columns will be displayed then.

    Kevin

  • freecexfreecex Posts: 25Questions: 4Answers: 0

    Great! It works!

  • freecexfreecex Posts: 25Questions: 4Answers: 0

    just last question Kevin... how can I pass to

    "ajax": {
    "url": "../YieldUP/Stiuazioni/LoadListaStorico",
    "data": <----- ???????,
    "type": "POST",
    "datatype": "json" },

    all my model, added to usual params? (mean my model and draw, etc etc)

  • kthorngrenkthorngren Posts: 21,242Questions: 26Answers: 4,929
    Answer ✓

    Answered in your other thread for this question:
    https://datatables.net/forums/discussion/51101/ajax#latest

    Kevin

This discussion has been closed.