Help needed (please & thank you) ScrollX and ScrollY

Help needed (please & thank you) ScrollX and ScrollY

nashcpnashcp Posts: 2Questions: 0Answers: 0
edited September 2013 in DataTables 1.9
Hello,

Thank you for taking time to assist me!

I have used Datatables before, mostly to fix the Headers for columns. This time my intension is to lock the header & 1st coumn (eventually poputlated w/12 Months). And then be able to view all comuns and records with the use of the scroll bars.

I have posted my code to: http://live.datatables.net/ijewan for everyone's review.

I using a coldfusion query to populate the rows, so I excluded that for now. I would just like to be able to get the ScrollX working so the table doesn't runoff the page as it currently does. My local version does show the scroll bars, and locks the headers, but the container is HUGE and exceeds my page/screen width which then triggers the browser x-axis scroll bar.

What am I doing wrong here.... it can't be just because the sheer number & size of the columns can it?

Thanks again,
-Christopher Nash

Replies

  • scd1982scd1982 Posts: 6Questions: 0Answers: 0
    I had a similar issue, which I managed to get to work using the following:
    [code]

    $(document).ready( function () {
    var oTable = $('#budget').dataTable( {
    "sScrollY": "500px",
    "sScrollX": "100%",
    "sScrollXInner": "150%",
    "bFilter": false,
    "bSort": false,
    "bInfo": false,
    "bPaginate": false
    } );
    new FixedColumns( oTable );
    } );

    [/code]
    You should be able to copy this and change the scroll X/Y values to whatever you need them to be.
    Also, be sure your table's id is set to "budget"
  • nashcpnashcp Posts: 2Questions: 0Answers: 0
    Thank You! I was under the impression that sScrollY/sScrollX needed to be integers.

    That worked! Issue resolved

    Thanks,
    -Christ
This discussion has been closed.