Wide table, horizontal scrolling

Wide table, horizontal scrolling

ve7tccve7tcc Posts: 25Questions: 8Answers: 0
edited June 2013 in DataTables 1.9
I have a fairly wide table, and am trying to get it to scroll horizontally. Has about 15-30 columns.

The rendered div dataTables_scrollBody has a width of 1161px, I assume calculated. The table has a width added too.
In firefox in the inspector, if I change it to 100% it behaves better. I am not sure what I do to trigger the numerical width.

I see in the code something about iSanityWidth, might be that.
I tried various values for sScrollXInner, to see if it helps.

var oTable = $('#Fuzzy').dataTable({
"bFilter": false,
"bSort": false,
"bInfo": false,
"sScrollX": "100%",
"sScrollY": "400px",
//"sScrollXInner": "2000%",
"bPaginate": false,
"bScrollCollapse": true

});
var oFC = new FixedColumns( oTable );

Any help appreciated.

Replies

  • allanallan Posts: 63,383Questions: 1Answers: 10,449 Site admin
    Can you link to the page so we can see what is going wrong please: http://datatables.net/forums/discussion/12899/post-test-cases-when-asking-for-help-please-read

    Allan
  • ve7tccve7tcc Posts: 25Questions: 8Answers: 0
    Try this

    http://www.kaiserportal.com/webtools/test.php

    See how the table spills out to the right

    Thank you!
  • ve7tccve7tcc Posts: 25Questions: 8Answers: 0
    Any idea why the horizontal scrolling is not working?
  • allanallan Posts: 63,383Questions: 1Answers: 10,449 Site admin
    edited June 2013
    Remove the `sScrollXInner` option from your DataTables initialisation and it should work okay.

    Allan
  • ve7tccve7tcc Posts: 25Questions: 8Answers: 0
    I tried that, no difference.
    I was trying to get something like this example, with the first column fixed:
    http://datatables.net/release-datatables/extras/FixedColumns/index.html

    Thanks for your help.
  • ve7tccve7tcc Posts: 25Questions: 8Answers: 0
    I'm making some progress. It seems Bootstrap css interferes with DataTables.
    When I don't include the bootstrap.css file it renders correctly.

    I just have to narrow it down to what it is in bootstrap.css that is causing the problem.
  • ve7tccve7tcc Posts: 25Questions: 8Answers: 0
    OK, I got it worked out.
    I added the DT_bootstrap.css and all is well.
    I took down the test page.
This discussion has been closed.